public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40013]  New: [4.4 regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class
@ 2009-05-03 22:10 goffrie at gmail dot com
  2009-05-04  9:09 ` [Bug c++/40013] [4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: goffrie at gmail dot com @ 2009-05-03 22:10 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4203 bytes --]

I get an ICE when compiling this code using GCC 4.4 from svn:

template <class I> class TestClass {
public:
        struct Subclass { struct { int c() {return 0;} } b; };
        void test();
};
template <class I> void TestClass<I>::test() {
        Subclass a;
        int d[a.b.c()];
}
int main() {
        TestClass<char> that;
        that.test();
}

goffrie@asplode tmp % g++ -v testcase.cpp -o testcase --save-temps
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.4.1_pre9999/work/gcc-4.4.1-9999/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.1-pre9999
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1-pre9999/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.1-pre9999
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.1-pre9999/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.1-pre9999/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1-pre9999/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --enable-nls --without-included-gettext
--with-system-zlib --disable-checking --disable-werror --enable-secureplt
--enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp
--enable-cld --disable-libgcj --enable-languages=c,c++,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo SVN' --with-ppl
--with-cloog
Thread model: posix
gcc version 4.4.1-pre9999 built 20090502 (prerelease) rev. 147067 (Gentoo SVN) 
COLLECT_GCC_OPTIONS='-v' '-o' 'testcase' '-save-temps' '-shared-libgcc'
'-mtune=generic'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.1-pre9999/cc1plus -E -quiet -v
-D_GNU_SOURCE testcase.cpp -mtune=generic -fpch-preprocess -o testcase.ii
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1-pre9999/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1-pre9999/include/g++-v4

/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1-pre9999/include/g++-v4/x86_64-pc-linux-gnu
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1-pre9999/include/g++-v4/backward
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1-pre9999/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1-pre9999/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-o' 'testcase' '-save-temps' '-shared-libgcc'
'-mtune=generic'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.1-pre9999/cc1plus -fpreprocessed
testcase.ii -quiet -dumpbase testcase.cpp -mtune=generic -auxbase testcase
-version -o testcase.s
GNU C++ (Gentoo SVN) version 4.4.1-pre9999 built 20090502 (prerelease) rev.
147067 (x86_64-pc-linux-gnu)
        compiled by GNU C version 4.4.1-pre9999 built 20090502 (prerelease)
rev. 147067, GMP version 4.3.0, MPFR version 2.4.1-p5.
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128109
Compiler executable checksum: 0168ca3d6bfe22e6160ea49ab7a5ec7b
testcase.cpp: In member function ‘void TestClass<I>::test() [with I =
char]’:
testcase.cpp:12:   instantiated from here
testcase.cpp:8: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.

It works fine with Gentoo's GCC 4.3.3-r2. I don't know if their patches affect
this, though.

This causes Dillo to fail to compile on its "dw/fltkui.cc".


-- 
           Summary: [4.4 regression] ICE when creating a local array with
                    size from the return value of a member function of an
                    object in a nested class in a template class
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: goffrie at gmail dot com
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


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

* [Bug c++/40013] [4.4 Regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class
  2009-05-03 22:10 [Bug c++/40013] New: [4.4 regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class goffrie at gmail dot com
@ 2009-05-04  9:09 ` rguenth at gcc dot gnu dot org
  2009-05-04 11:26 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-05-04  9:09 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.3.3
            Summary|[4.4 regression] ICE when   |[4.4 Regression] ICE when
                   |creating a local array with |creating a local array with
                   |size from the return value  |size from the return value
                   |of a member function of an  |of a member function of an
                   |object in a nested class in |object in a nested class in
                   |a template class            |a template class
   Target Milestone|---                         |4.4.1


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


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

* [Bug c++/40013] [4.4 Regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class
  2009-05-03 22:10 [Bug c++/40013] New: [4.4 regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class goffrie at gmail dot com
  2009-05-04  9:09 ` [Bug c++/40013] [4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2009-05-04 11:26 ` jakub at gcc dot gnu dot org
  2009-05-05  6:37 ` [Bug c++/40013] [4.4/4.5 " jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-05-04 11:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jakub at gcc dot gnu dot org  2009-05-04 11:26 -------
http://gcc.gnu.org/ml/gcc-patches/2009-05/msg00116.html


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-05-04 11:26:08
               date|                            |


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


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

* [Bug c++/40013] [4.4/4.5 Regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class
  2009-05-03 22:10 [Bug c++/40013] New: [4.4 regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class goffrie at gmail dot com
  2009-05-04  9:09 ` [Bug c++/40013] [4.4 Regression] " rguenth at gcc dot gnu dot org
  2009-05-04 11:26 ` jakub at gcc dot gnu dot org
@ 2009-05-05  6:37 ` jakub at gcc dot gnu dot org
  2009-05-05  6:42 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-05-05  6:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2009-05-05 06:37 -------
Subject: Bug 40013

Author: jakub
Date: Tue May  5 06:37:05 2009
New Revision: 147119

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147119
Log:
        PR c++/40013
        * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
        set it from its operand's type after tsubst_expr.

        * g++.dg/ext/vla7.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/ext/vla7.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/40013] [4.4/4.5 Regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class
  2009-05-03 22:10 [Bug c++/40013] New: [4.4 regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class goffrie at gmail dot com
                   ` (2 preceding siblings ...)
  2009-05-05  6:37 ` [Bug c++/40013] [4.4/4.5 " jakub at gcc dot gnu dot org
@ 2009-05-05  6:42 ` jakub at gcc dot gnu dot org
  2009-05-05  6:48 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-05-05  6:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2009-05-05 06:41 -------
Subject: Bug 40013

Author: jakub
Date: Tue May  5 06:41:33 2009
New Revision: 147120

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147120
Log:
        PR c++/40013
        * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
        set it from its operand's type after tsubst_expr.

        * g++.dg/ext/vla7.C: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/ext/vla7.C
      - copied unchanged from r147119, trunk/gcc/testsuite/g++.dg/ext/vla7.C
Modified:
    branches/gcc-4_4-branch/gcc/cp/ChangeLog
    branches/gcc-4_4-branch/gcc/cp/pt.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/40013] [4.4/4.5 Regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class
  2009-05-03 22:10 [Bug c++/40013] New: [4.4 regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class goffrie at gmail dot com
                   ` (3 preceding siblings ...)
  2009-05-05  6:42 ` jakub at gcc dot gnu dot org
@ 2009-05-05  6:48 ` jakub at gcc dot gnu dot org
  2009-05-14  0:36 ` hjl dot tools at gmail dot com
  2009-05-26 16:38 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-05-05  6:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2009-05-05 06:47 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/40013] [4.4/4.5 Regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class
  2009-05-03 22:10 [Bug c++/40013] New: [4.4 regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class goffrie at gmail dot com
                   ` (4 preceding siblings ...)
  2009-05-05  6:48 ` jakub at gcc dot gnu dot org
@ 2009-05-14  0:36 ` hjl dot tools at gmail dot com
  2009-05-26 16:38 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-05-14  0:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2009-05-14 00:35 -------
*** Bug 40137 has been marked as a duplicate of this bug. ***


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |piccinini dot santiago at
                   |                            |gmail dot com


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


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

* [Bug c++/40013] [4.4/4.5 Regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class
  2009-05-03 22:10 [Bug c++/40013] New: [4.4 regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class goffrie at gmail dot com
                   ` (5 preceding siblings ...)
  2009-05-14  0:36 ` hjl dot tools at gmail dot com
@ 2009-05-26 16:38 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-26 16:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2009-05-26 16:37 -------
*** Bug 40260 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tux008 at googlemail dot com


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


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

end of thread, other threads:[~2009-05-26 16:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-03 22:10 [Bug c++/40013] New: [4.4 regression] ICE when creating a local array with size from the return value of a member function of an object in a nested class in a template class goffrie at gmail dot com
2009-05-04  9:09 ` [Bug c++/40013] [4.4 Regression] " rguenth at gcc dot gnu dot org
2009-05-04 11:26 ` jakub at gcc dot gnu dot org
2009-05-05  6:37 ` [Bug c++/40013] [4.4/4.5 " jakub at gcc dot gnu dot org
2009-05-05  6:42 ` jakub at gcc dot gnu dot org
2009-05-05  6:48 ` jakub at gcc dot gnu dot org
2009-05-14  0:36 ` hjl dot tools at gmail dot com
2009-05-26 16:38 ` 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).