public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51154] New: internal compiler error: gimplification failed
@ 2011-11-16  7:29 cas43 at cs dot stanford.edu
  2011-11-16  7:44 ` [Bug c++/51154] " cas43 at cs dot stanford.edu
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: cas43 at cs dot stanford.edu @ 2011-11-16  7:29 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51154
           Summary: internal compiler error: gimplification failed
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: cas43@cs.stanford.edu


Created attachment 25833
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25833
Program that cuases g++ to ICE.

How to reproduce: g++ -c prog.cpp

DIAGNOSTIC:

gimplification failed:
<<< Unknown tree: using_decl >>> <using_decl 0x7f3d605e9f18 counts
    type <record_type 0x7f3d605f0c78 BASE sizes-gimplified used type_5 type_6
DI
        size <integer_cst 0x7f3d60469f40 constant 64>
        unit size <integer_cst 0x7f3d60469f60 constant 8>
        align 32 symtab 0 alias set -1 canonical type 0x7f3d605e7d20
        fields <field_decl 0x7f3d605d3da8 counts type <integer_type
0x7f3d604825e8 int>
            nonlocal decl_3 SI file prog.cpp line 5 col 9
            size <integer_cst 0x7f3d604852c0 constant 32>
            unit size <integer_cst 0x7f3d604852e0 constant 4>
            align 32 offset_align 128
            offset <integer_cst 0x7f3d60469f80 constant 0>
            bit offset <integer_cst 0x7f3d60469fe0 constant 0> context
<record_type 0x7f3d605e7d20 ARRAYS_ND_BASE> chain <field_decl 0x7f3d605d3e40
array>> context <translation_unit_decl 0x7f3d6047f170 D.1>
        full-name "ARRAY<float, VECTOR<int> >::BASE"
        X() X(constX&) this=(X&) n_parents=0 use_template=1 interface-unknown
        pointer_to_this <pointer_type 0x7f3d605f6540> reference_to_this
<reference_type 0x7f3d605f6888> chain <type_decl 0x7f3d605e9450
ARRAYS_ND_BASE>>
    ignored VOID file prog.cpp line 16 col 17
    align 1 context <record_type 0x7f3d605e7bd0 ARRAY> initial <field_decl
0x7f3d605d3da8 counts>
    chain <type_decl 0x7f3d605e9ac8 ARRAY>>
prog.cpp: In member function ‘void ARRAY<T, VECTOR<int> >::Resize() [with T =
float]’:
prog.cpp:17:20: internal compiler error: gimplification failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

COMPILER VERSION:

Using built-in specs.
COLLECT_GCC=/home/cas43/new-gcc/inst/bin/g++
COLLECT_LTO_WRAPPER=/home/cas43/new-gcc/inst/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../current-gcc/configure --prefix=/home/cas43/new-gcc/inst
Thread model: posix
gcc version 4.7.0 20111116 (experimental) (GCC)


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

* [Bug c++/51154] internal compiler error: gimplification failed
  2011-11-16  7:29 [Bug c++/51154] New: internal compiler error: gimplification failed cas43 at cs dot stanford.edu
@ 2011-11-16  7:44 ` cas43 at cs dot stanford.edu
  2011-11-16  8:15 ` cas43 at cs dot stanford.edu
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: cas43 at cs dot stanford.edu @ 2011-11-16  7:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Craig Schroeder <cas43 at cs dot stanford.edu> 2011-11-16 07:28:29 UTC ---
Created attachment 25834
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25834
Variation on same source causing failure with different message.

This variant on the source file ICE's with this message:

[lots of errors here]
g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Full diagnostic:

two.cpp:7:33: error: expected ‘;’ after class definition
two.cpp:19:20: error: ‘T’ was not declared in this scope
two.cpp:19:21: error: template argument 1 is invalid
two.cpp:39:36: error: ‘T’ does not name a type
two.cpp:39:38: error: ISO C++ forbids declaration of ‘dt’ with no type
[-fpermissive]
two.cpp:39:47: error: ‘T’ does not name a type
two.cpp:39:49: error: ISO C++ forbids declaration of ‘time’ with no type
[-fpermissive]
two.cpp:45:18: error: ‘STREAM_TYPE’ does not name a type
two.cpp:52:80: error: ‘T’ does not name a type
two.cpp:52:82: error: ISO C++ forbids declaration of ‘dt’ with no type
[-fpermissive]
two.cpp:52:91: error: ‘T’ does not name a type
two.cpp:52:93: error: ISO C++ forbids declaration of ‘time’ with no type
[-fpermissive]
two.cpp: In member function ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int,
int)’:
two.cpp:53:15: error: ‘T’ was not declared in this scope
two.cpp:53:17: error: ‘TV_INT’ was not declared in this scope
two.cpp:53:23: error: template argument 1 is invalid
two.cpp:53:23: error: template argument 2 is invalid
two.cpp:53:38: error: invalid type in declaration before ‘(’ token
two.cpp: In instantiation of ‘class VECTOR<float, 1>’:
two.cpp:43:37:   required from ‘class ADVECTION_EXAMPLE<VECTOR<float, 1> >’
two.cpp:53:79:   required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int,
int) [with TV = VECTOR<float, 1>]’
two.cpp:55:25:   required from here
two.cpp:8:37: error: invalid use of incomplete type ‘class VECTOR_BASE<float,
VECTOR<float, 1> >’
two.cpp:6:40: error: declaration of ‘class VECTOR_BASE<float, VECTOR<float, 1>
>’
two.cpp: In instantiation of ‘class ADVECTION_EXAMPLE<VECTOR<float, 1> >’:
two.cpp:53:79:   required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int,
int) [with TV = VECTOR<float, 1>]’
two.cpp:55:25:   required from here
two.cpp:12:21: error: ‘typedef float VECTOR<float, 1>::SCALAR’ is private
two.cpp:43:37: error: within this context
two.cpp:9:35: error: ‘template<class T2> struct VECTOR<float, 1>::REBIND’ is
private
two.cpp:44:57: error: within this context
two.cpp:12:21: error: ‘typedef float VECTOR<float, 1>::SCALAR’ is private
two.cpp:47:25: error: within this context
two.cpp:9:35: error: ‘template<class T2> struct VECTOR<float, 1>::REBIND’ is
private
two.cpp:47:25: error: within this context
two.cpp: In instantiation of ‘class ARRAYS_ND_BASE<VECTOR<float, 1> >’:
two.cpp:23:37:   required from ‘class ARRAY<float, VECTOR<int, 1> >’
two.cpp:47:25:   required from ‘class ADVECTION_EXAMPLE<VECTOR<float, 1> >’
two.cpp:53:79:   required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int,
int) [with TV = VECTOR<float, 1>]’
two.cpp:55:25:   required from here
two.cpp:14:32: error: no type named ‘ELEMENT’ in ‘class VECTOR<float, 1>’
two.cpp:15:14: error: ‘dimension’ is not a member of ‘VECTOR<float, 1>’
two.cpp: In instantiation of ‘class VECTOR<int, 0>’:
two.cpp:18:16:   required from ‘class ARRAYS_ND_BASE<VECTOR<float, 1> >’
two.cpp:23:37:   required from ‘class ARRAY<float, VECTOR<int, 1> >’
two.cpp:47:25:   required from ‘class ADVECTION_EXAMPLE<VECTOR<float, 1> >’
two.cpp:53:79:   required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int,
int) [with TV = VECTOR<float, 1>]’
two.cpp:55:25:   required from here
two.cpp:8:37: error: invalid use of incomplete type ‘class VECTOR_BASE<int,
VECTOR<int, 0> >’
two.cpp:6:40: error: declaration of ‘class VECTOR_BASE<int, VECTOR<int, 0> >’
two.cpp: In instantiation of ‘class ARRAY<float, VECTOR<int, 1> >’:
two.cpp:47:25:   required from ‘class ADVECTION_EXAMPLE<VECTOR<float, 1> >’
two.cpp:53:79:   required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int,
int) [with TV = VECTOR<float, 1>]’
two.cpp:55:25:   required from here
two.cpp:19:23: error: ‘int ARRAYS_ND_BASE<VECTOR<float, 1> >::array’ is private
two.cpp:23:37: error: within this context
two.cpp:18:16: error: ‘ARRAYS_ND_BASE<VECTOR<float, 1> >::TV_INT
ARRAYS_ND_BASE<VECTOR<float, 1> >::counts’ is private
two.cpp:23:37: error: within this context
two.cpp: In instantiation of ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int,
int) [with TV = VECTOR<float, 1>]’:
two.cpp:55:25:   required from here
two.cpp:53:79: error: expression list treated as compound expression in
initializer [-fpermissive]
two.cpp: In instantiation of ‘class VECTOR<int, 1>’:
two.cpp:53:79:   required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int,
int) [with TV = VECTOR<float, 1>]’
two.cpp:55:25:   required from here
two.cpp:8:37: error: invalid use of incomplete type ‘class VECTOR_BASE<int,
VECTOR<int, 1> >’
two.cpp:6:40: error: declaration of ‘class VECTOR_BASE<int, VECTOR<int, 1> >’
two.cpp: In instantiation of ‘void ARRAY<T, VECTOR<int, d> >::Resize(const
RANGE<VECTOR<int, d> >&, bool, bool, const T&) [with T = float; int d = 1]’:
two.cpp:50:9:   required from ‘void ADVECTION_DRIVER<TV>::Initialize() [with TV
= VECTOR<float, 1>]’
two.cpp:55:25:   required from here
two.cpp:31:46: error: ‘const class RANGE<VECTOR<int, 1> >’ has no member named
‘Edge_Lengths’
two.cpp:20:55: error: ‘ARRAYS_ND_BASE<TV>& ARRAYS_ND_BASE<TV>::operator=(const
T_ARRAY2&) [with T_ARRAY2 = VECTOR<int, 1>; TV = VECTOR<float, 1>;
ARRAYS_ND_BASE<TV> = ARRAYS_ND_BASE<VECTOR<float, 1> >]’ is private
two.cpp:32:3: error: within this context
g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug c++/51154] internal compiler error: gimplification failed
  2011-11-16  7:29 [Bug c++/51154] New: internal compiler error: gimplification failed cas43 at cs dot stanford.edu
  2011-11-16  7:44 ` [Bug c++/51154] " cas43 at cs dot stanford.edu
@ 2011-11-16  8:15 ` cas43 at cs dot stanford.edu
  2011-11-23  0:23 ` marc.glisse at normalesup dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: cas43 at cs dot stanford.edu @ 2011-11-16  8:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Craig Schroeder <cas43 at cs dot stanford.edu> 2011-11-16 07:30:12 UTC ---
Created attachment 25835
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25835
Another file variant causing a third diagnostic on ICE.

This variant on the file produces the following diagnostic:

four.cpp: In member function ‘void ADVECTION_DRIVER<TV>::Scalar_Advance()’:
four.cpp:30:33: error: ‘T’ was not declared in this scope
four.cpp:30:35: error: ‘TV_INT’ was not declared in this scope
four.cpp:30:41: error: template argument 1 is invalid
four.cpp:30:41: error: template argument 2 is invalid
four.cpp:30:56: error: invalid type in declaration before ‘(’ token
four.cpp: In instantiation of ‘void ADVECTION_DRIVER<TV>::Scalar_Advance()
[with TV = VECTOR<float, 1>]’:
four.cpp:33:16:   required from here
four.cpp:30:64: error: expression list treated as compound expression in
initializer [-fpermissive]
four.cpp: In member function ‘void ARRAY<T, VECTOR<int, d> >::Resize() [with T
= float; int d = 1]’:
four.cpp:21:20: internal compiler error: in create_tmp_var, at gimplify.c:468
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug c++/51154] internal compiler error: gimplification failed
  2011-11-16  7:29 [Bug c++/51154] New: internal compiler error: gimplification failed cas43 at cs dot stanford.edu
  2011-11-16  7:44 ` [Bug c++/51154] " cas43 at cs dot stanford.edu
  2011-11-16  8:15 ` cas43 at cs dot stanford.edu
@ 2011-11-23  0:23 ` marc.glisse at normalesup dot org
  2011-11-23  0:58 ` paolo.carlini at oracle dot com
  2011-12-05 13:11 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-11-23  0:23 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <marc.glisse at normalesup dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc.glisse at normalesup
                   |                            |dot org

--- Comment #3 from Marc Glisse <marc.glisse at normalesup dot org> 2011-11-22 23:36:26 UTC ---
This appears to be a 4.7 regression. I got the same create_tmp_var ICE message
with a different code (3.5MB, I won't reduce it since there is already a very
nice testcase attached to the bug :-)


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

* [Bug c++/51154] internal compiler error: gimplification failed
  2011-11-16  7:29 [Bug c++/51154] New: internal compiler error: gimplification failed cas43 at cs dot stanford.edu
                   ` (2 preceding siblings ...)
  2011-11-23  0:23 ` marc.glisse at normalesup dot org
@ 2011-11-23  0:58 ` paolo.carlini at oracle dot com
  2011-12-05 13:11 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-23  0:58 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-23 00:26:23 UTC ---
Richard, can you help triaging this?


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

* [Bug c++/51154] internal compiler error: gimplification failed
  2011-11-16  7:29 [Bug c++/51154] New: internal compiler error: gimplification failed cas43 at cs dot stanford.edu
                   ` (3 preceding siblings ...)
  2011-11-23  0:58 ` paolo.carlini at oracle dot com
@ 2011-12-05 13:11 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-05 13:11 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-05 13:10:45 UTC ---
All testcases work for me.


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

end of thread, other threads:[~2011-12-05 13:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-16  7:29 [Bug c++/51154] New: internal compiler error: gimplification failed cas43 at cs dot stanford.edu
2011-11-16  7:44 ` [Bug c++/51154] " cas43 at cs dot stanford.edu
2011-11-16  8:15 ` cas43 at cs dot stanford.edu
2011-11-23  0:23 ` marc.glisse at normalesup dot org
2011-11-23  0:58 ` paolo.carlini at oracle dot com
2011-12-05 13:11 ` rguenth at gcc dot gnu.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).