public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11672] New: ICE on template instantiation in erroneous source.
@ 2003-07-25 14:03 duz at sol-3 dot de
  2003-07-25 14:15 ` [Bug c++/11672] [3.3 regression] " bangerth at dealii dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: duz at sol-3 dot de @ 2003-07-25 14:03 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11672

           Summary: ICE on template instantiation in erroneous source.
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: duz at sol-3 dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-freebsd4.8
  GCC host triplet: i386-unknown-freebsd4.8
GCC target triplet: i386-unknown-freebsd4.8

The following snippet of erroneous source code crashes the
gcc-3.3 compiler. I tried on various systems. It seems to
crash on x86 and sparc, and to issue the proper error message:

bumm.cc: In constructor `A<T>::A() [with T = void]':
bumm.cc:9:   instantiated from here
bumm.cc:6: `void' is not an aggregate type

on PowerPC based systems.


--------------------------------------
template <class T>
class A
{
  int n;
public:
  A() : n (T::foo()) {}
};

A<void> a;
-------------------------------------

Here is a run on my FreeBSD system. This specific compiler was
bootstrapped with

BOOT_CFLAGS="-pipe -O2 -fomit-frame-pointer -mpreferred-stack-boundary=2
-march=athlon-tbird"


merkur:~/cc/tmp$ gcc -v -S bumm.cc
Reading specs from /opt/gnu/bin/../lib/gcc-lib/i386-unknown-freebsd4.8/3.3/specs
Configured with: /pub/unpacked/gcc-3.3/configure --prefix=/opt/gnu/gcc-3.3
--disable-shared
Thread model: posix
gcc version 3.3
 /opt/gnu/bin/../lib/gcc-lib/i386-unknown-freebsd4.8/3.3/cc1plus -quiet -v
-iprefix /opt/gnu/bin/../lib/gcc-lib/i386-unknown-freebsd4.8/3.3/ -D__GNUC__=3
-D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 bumm.cc -D__GNUG__=3 -quiet -dumpbase
bumm.cc -auxbase bumm -version -o bumm.s
GNU C++ version 3.3 (i386-unknown-freebsd4.8)
        compiled by GNU C version 3.3.
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=65137
ignoring nonexistent directory
"/opt/gnu/lib/gcc-lib/../../i386-unknown-freebsd4.8/include"
ignoring nonexistent directory "/opt/gnu/gcc-3.3/i386-unknown-freebsd4.8/include"
ignoring duplicate directory "/opt/gnu/gcc-3.3/include/c++/3.3"
ignoring duplicate directory
"/opt/gnu/gcc-3.3/include/c++/3.3/i386-unknown-freebsd4.8"
ignoring duplicate directory "/opt/gnu/gcc-3.3/include/c++/3.3/backward"
ignoring duplicate directory
"/opt/gnu/gcc-3.3/lib/gcc-lib/i386-unknown-freebsd4.8/3.3/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/gnu/lib/gcc-lib/../../include/c++/3.3
 /opt/gnu/lib/gcc-lib/../../include/c++/3.3/i386-unknown-freebsd4.8
 /opt/gnu/lib/gcc-lib/../../include/c++/3.3/backward
 /opt/gnu/lib/gcc-lib/i386-unknown-freebsd4.8/3.3/include
 /usr/local/include
 /opt/gnu/gcc-3.3/include
 /usr/include
End of search list.
bumm.cc: In constructor `A<T>::A() [with T = void]':
bumm.cc:9:   instantiated from here
bumm.cc:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
merkur:~/cc/tmp$


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/11672] [3.3 regression] ICE on template instantiation in erroneous source.
  2003-07-25 14:03 [Bug c++/11672] New: ICE on template instantiation in erroneous source duz at sol-3 dot de
@ 2003-07-25 14:15 ` bangerth at dealii dot org
  2003-07-25 14:18 ` pinskia at physics dot uc dot edu
  2004-04-21  1:27 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2003-07-25 14:15 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11672


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE on template             |[3.3 regression] ICE on
                   |instantiation in erroneous  |template instantiation in
                   |source.                     |erroneous source.


------- Additional Comments From bangerth at dealii dot org  2003-07-25 14:15 -------
I can confirm that it ICEs in 3.3.0, but not with 3.2 and not with present
mainline. I don't have a recent build of the 3.3 branch on this system,
though, so someone else will have to check whether this is indeed
a regression that's still alive. (It also ICEs with an older mainline
snapshot I have on this system, so it might be that the fix for mainline
was also applied to 3.3.1.)

W.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/11672] [3.3 regression] ICE on template instantiation in erroneous source.
  2003-07-25 14:03 [Bug c++/11672] New: ICE on template instantiation in erroneous source duz at sol-3 dot de
  2003-07-25 14:15 ` [Bug c++/11672] [3.3 regression] " bangerth at dealii dot org
@ 2003-07-25 14:18 ` pinskia at physics dot uc dot edu
  2004-04-21  1:27 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-25 14:18 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11672


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-25 14:18 -------
Already fixed in 3.3.1 (20030707).


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/11672] [3.3 regression] ICE on template instantiation in erroneous source.
  2003-07-25 14:03 [Bug c++/11672] New: ICE on template instantiation in erroneous source duz at sol-3 dot de
  2003-07-25 14:15 ` [Bug c++/11672] [3.3 regression] " bangerth at dealii dot org
  2003-07-25 14:18 ` pinskia at physics dot uc dot edu
@ 2004-04-21  1:27 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-21  1:27 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.0                       |3.3.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11672


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-04-21  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-25 14:03 [Bug c++/11672] New: ICE on template instantiation in erroneous source duz at sol-3 dot de
2003-07-25 14:15 ` [Bug c++/11672] [3.3 regression] " bangerth at dealii dot org
2003-07-25 14:18 ` pinskia at physics dot uc dot edu
2004-04-21  1:27 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).