Bug 33382 - [4.2 Regression] internal compiler error: in get_constraint_for_component_ref, at tree-ssa-structalias.c:2454
Summary: [4.2 Regression] internal compiler error: in get_constraint_for_component_ref...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.1
: P3 normal
Target Milestone: 4.2.2
Assignee: Richard Biener
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2007-09-11 01:03 UTC by Kumar Appaiah
Modified: 2007-09-12 08:27 UTC (History)
4 users (show)

See Also:
Host: i486-linux-gnu
Target: i486-linux-gnu
Build: i486-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2007-09-11 11:37:07


Attachments
slightly reduced testcase (577 bytes, text/plain)
2007-09-11 09:37 UTC, Bernhard Reutner-Fischer
Details
untested patch (1008 bytes, patch)
2007-09-11 12:08 UTC, Richard Biener
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kumar Appaiah 2007-09-11 01:03:01 UTC
Hello! I am using Debian's gcc 4.2.1, and I am running into some trouble while compiling logapp, available at http://logapp.sourceforge.net

Here are the details:
gcc -v -save-temps -Wall -O2   -c -o configuration.o configuration.c
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-targets=all --disable-werror --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.1 (Debian 4.2.1-5)
 /usr/lib/gcc/i486-linux-gnu/4.2.1/cc1 -E -quiet -v configuration.c -mtune=generic -Wall -O2 -fpch-preprocess -o configuration.i
ignoring nonexistent directory "/usr/local/include/i486-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/i486-linux-gnu/4.2.1/../../../../i486-linux-gnu/include"
ignoring nonexistent directory "/usr/include/i486-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/i486-linux-gnu/4.2.1/include
 /usr/include
End of search list.
 /usr/lib/gcc/i486-linux-gnu/4.2.1/cc1 -fpreprocessed configuration.i -quiet -dumpbase configuration.c -mtune=generic -auxbase-strip configuration.o -O2 -Wall -version -o configuration.s
GNU C version 4.2.1 (Debian 4.2.1-5) (i486-linux-gnu)
        compiled by GNU C version 4.2.1 (Debian 4.2.1-5).
GGC heuristics: --param ggc-min-expand=63 --param ggc-min-heapsize=63302
Compiler executable checksum: 679d5de8862f4a3c8f9b9a34b5dbcc68
configuration.c: In function 'get_argid':
configuration.c:567: internal compiler error: in get_constraint_for_component_ref, at tree-ssa-structalias.c:2454
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.
make: *** [configuration.o] Error 1

Observation: The bug disappears if I remove -O2 from the compiler flags.

Should you require the preprocessed file, please tell me and I shall put it somewhere where you can pick it up.

Thanks!
Comment 1 Andrew Pinski 2007-09-11 02:17:35 UTC
Yes we would like the preprocessed source.
Comment 2 Kumar Appaiah 2007-09-11 02:39:45 UTC
http://www.ee.iitm.ac.in/~ee03b091/dump/configuration.txt

HTH.

Kumar
Comment 3 Bernhard Reutner-Fischer 2007-09-11 09:37:53 UTC
Created attachment 14186 [details]
slightly reduced testcase

ICEs with -O1
Comment 4 Richard Biener 2007-09-11 11:37:07 UTC
Confirmed.
Comment 5 Richard Biener 2007-09-11 12:08:24 UTC
Created attachment 14187 [details]
untested patch

testing appreciated (I'm at a conference right now)
Comment 6 Richard Biener 2007-09-11 12:08:52 UTC
Note mailine is fixed by doing PTA "correct" now.
Comment 7 Richard Biener 2007-09-12 07:54:30 UTC
Subject: Bug 33382

Author: rguenth
Date: Wed Sep 12 07:54:17 2007
New Revision: 128417

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128417
Log:
2007-09-12  Richard Guenther  <rguenther@suse.de>

	PR middle-end/33382
	* tree-ssa-structalias.c (get_constraint_for_component_ref):
	Note that accesses to a whole flexible array member may not lead
	to a subvariable.

	* gcc.c-torture/compile/pr33382.c: New testcase.
	* gcc.c-torture/execute/pr33382.c: Likewise.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/gcc.c-torture/compile/pr33382.c
    branches/gcc-4_2-branch/gcc/testsuite/gcc.c-torture/execute/pr33382.c
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_2-branch/gcc/tree-ssa-structalias.c

Comment 8 Richard Biener 2007-09-12 08:07:27 UTC
Subject: Bug 33382

Author: rguenth
Date: Wed Sep 12 08:07:12 2007
New Revision: 128419

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128419
Log:
2007-09-12  Richard Guenther  <rguenther@suse.de>

	PR middle-end/33382
	* gcc.c-torture/compile/pr33382.c: New testcase.
	* gcc.c-torture/execute/pr33382.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr33382.c
      - copied unchanged from r128417, branches/gcc-4_2-branch/gcc/testsuite/gcc.c-torture/compile/pr33382.c
    trunk/gcc/testsuite/gcc.c-torture/execute/pr33382.c
      - copied unchanged from r128417, branches/gcc-4_2-branch/gcc/testsuite/gcc.c-torture/execute/pr33382.c
Modified:
    trunk/gcc/testsuite/ChangeLog

Comment 9 Richard Biener 2007-09-12 08:27:09 UTC
Fixed.