Article View: gnu.g++.bug
Article #1343Re: [jbg@qualcomm.com: Core dump now internal error]
From: wilson
Date: Wed, 06 Jan 1993 23:26
Date: Wed, 06 Jan 1993 23:26
98 lines
3731 bytes
3731 bytes
It is a C++ front end bug. Note that `-O -funroll-loops' works fine.
It fails only when you add the `-g' option.
The C++ front end is passing incorrect debug info to the back end.
Technically, the number of tree BLOCKS (1) does not match the number of
NOTE_INSN_BLOCK_* note pairs (4). Normally, the result is relatively
harmless, you just end up with a file that can't reasonably be debugged.
When using -funroll-loops, however, the back end must modify the debug info
to account for any unrolled loops. If the debug info is not correct to
begin with, the loop unrolling code may fail. It won't always fail, because
we have attempted to write the loop unrolling code to cope with this
long-standing C++ front end bug. This is a case where it still fails.
Rather than add more bug avoidance code to the loop unroller, I think
it is better to fix the problem in the C++ front end, which is where the
bug actually is.
Jim Wilson
wilson@cygnus.com
From: brendan@cygnus.com (Brendan Kehoe)
To: bug-gcc@prep.ai.mit.edu
Subject: [jbg@qualcomm.com: Core dump now internal error]
I think this is a back-end problem. `-O -g -funroll-loops' is what
triggers it.
------- Start of forwarded message -------
From: Jeff Gehlhaar <jbg@qualcomm.com>
Subject: Core dump now internal error
To: bug-g++@prep.ai.mit.edu
Date: Mon, 4 Jan 1993 09:19:11 -0700
X-Sender: jbg@wizard.qualcomm.com
// This program used to cause G++ to dump core. It now causes an internal
// compiler error.
// All of this, both code and options, seem to be necessary to tickle
// the bug. Don't ask _me_ why; I don't see how they are related....
// The result of ``g++ -v -c -O -g -funroll-loops bug006.cc'' is attached below.
// -- Greg
#include <iostream.h>
#define SHOW(x) do { cout << x << endl; } while (0)
class List
{
public:
List(void) { list = 0; }
class List *list;
};
class Class
{
public:
Class(char *param);
List queue;
};
Class::Class(char *param)
{
SHOW("Display some text");
}
/* Compiler output follows:
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
gcc version 2.3.3
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cpp -lang-c++ -v -undef
- -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__
- -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix -D__OPTIMIZE__ -g bug006.cc
/usr/tmp/cca29841.i
GNU CPP version 2.3.3 (sparc)
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cc1plus
/usr/tmp/cca29841.i -quiet -dumpbase bug006.cc -g -O -version
- -funroll-loops -o /usr/tmp/cca29841.s
GNU C++ version 2.3.3 (sparc) compiled by CC.
bug006.cc: In method `Class::Class (char *)':
bug006.cc:31: Internal compiler error.
bug006.cc:31: Please report this to `bug-g++@prep.ai.mit.edu'.
Compiler output above */
======================================================
Jeff Gehlhaar Qualcomm Inc,
jbg@qualcomm.com San Diego, CA, USA
(619) 597-5241 "The Elegant Solution...."
======================================================
------- End of forwarded message -------
--
Brendan Kehoe brendan@cygnus.com
Cygnus Support, Mountain View, CA +1 415 903 1400
Technical Details
Message-ID:
<9301062326.AA00905@sphagnum.cygnus.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!wilsonShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!wilson From: wilson@cygnus.com Subject: Re: [jbg@qualcomm.com: Core dump now internal error] Message-ID: <9301062326.AA00905@sphagnum.cygnus.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Wed, 6 Jan 1993 23:26:21 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 101