Bug 28358 - ICE on valide template code using -O1 or -O2, but *not* with -O0 or -O3
Summary: ICE on valide template code using -O1 or -O2, but *not* with -O0 or -O3
Status: RESOLVED DUPLICATE of bug 28116
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.1.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-12 13:02 UTC by Peter Soetens
Modified: 2007-08-24 00:24 UTC (History)
11 users (show)

See Also:
Host: i486-linux-gnu
Target: i486-linux-gnu
Build: i486-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2006-07-18 14:03:21


Attachments
Compressed (bzip2) preprocessed file (300.95 KB, application/octet-stream)
2006-07-12 13:05 UTC, Peter Soetens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Soetens 2006-07-12 13:02:16 UTC
Full version string:
g++-4.1 (GCC) 4.1.2 20060708 (prerelease) (Ubuntu 4.1.1-8ubuntu1)
Same problem exists in Debian 'etch'.

The error message after the location of the crash is:
/usr/include/boost/spirit/core/composite/actions.hpp:106: internal compiler error: in expand_expr_addr_expr_1, at expr.c:6336

It only occurs using the -O1 and -O2 flags, but succeeds in compiling using -O0 or -O3. No other flags need to be given to trigger this crash.

Older compiler versions (4.0,3.4,3.3...) do not have this bug.

Preprocessed code follows...
Comment 1 Peter Soetens 2006-07-12 13:05:43 UTC
Created attachment 11866 [details]
Compressed (bzip2) preprocessed file

After unzipping, compile this file using:

$ g++-4.1 -c attachment.ii -O2 -o attachment.o
Comment 2 Wolfgang Bangerth 2006-07-18 14:03:21 UTC
Confirmed, though the testcase is huge and the error message atrocious.
Someone will have to take the time to reduce something smaller out of
this whole boost mess...

W.
Comment 3 David Fang 2006-10-19 18:03:01 UTC
ping?  ice-on-valid in boost
Comment 4 Andrew Pinski 2006-10-19 18:06:36 UTC
This is most likely a dup of bug 28116 anyways.
Comment 5 Richard Biener 2007-02-03 13:13:06 UTC
I cannot reproduce this with either current 4.1 branch head nor g++ (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21).
Comment 6 Andrew Pinski 2007-08-24 00:24:50 UTC
Yes this is a dup of PR 28116.

*** This bug has been marked as a duplicate of 28116 ***