Bug 38499 - [graphite] ICE: in scan_tree_for_params, at graphite.c:253
Summary: [graphite] ICE: in scan_tree_for_params, at graphite.c:253
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-12 00:03 UTC by Tobias Grosser
Modified: 2009-01-08 03:17 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-12-12 01:15:46


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Grosser 2008-12-12 00:03:30 UTC
While bootstrapping gcc with BOOT_CFLAGS="-g -O2 -fgraphite" I get:

/usr/home/Tobi/Projekte/gcc/checkouts/git_trunk/build/gcc/./prev-gcc/xgcc -B/usr/home/Tobi/Projekte/gcc/checkouts/git_trunk/build/gcc/./prev-gcc/ -B/usr/home/Tobi/Projekte/gcc/checkouts/git/bin_trunk/gcc/i386-unknown-freebsd8.0/bin/  -I../../../git/libcpp -I. -I../../../git/libcpp/../include -I./../intl -I../../../git/libcpp/include  -g -O2 -fgraphite -fomit-frame-pointer -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Werror -I../../../git/libcpp -I. -I../../../git/libcpp/../include -I./../intl -I../../../git/libcpp/include  -c -o charset.o -MT charset.o -MMD -MP -MF .deps/charset.Tpo ../../../git/libcpp/charset.c
../../../git/libcpp/charset.c: In function 'one_utf32_to_utf8':
../../../git/libcpp/charset.c:307: internal compiler error: in scan_tree_for_params, at graphite.c:2536

I am trying to reduce a test case.
Comment 1 Tobias Grosser 2008-12-12 01:15:46 UTC
Got a backtrace:
#0  internal_error (gmsgid=0x8ae3807 "in %s, at %s:%d") at ../../../git/gcc/diagnostic.c:656
#1  0x081d2481 in fancy_abort (file=Could not find the frame base for "fancy_abort".
) at ../../../git/gcc/diagnostic.c:712
#2  0x089d6a49 in scan_tree_for_params (s=0x29434070, e=0x296c95c0, c=0x0, r=0, k=0xbfbfe888, 
    subtract=0 '\0') at ../../../git/gcc/graphite.c:2412
#3  0x089d6a2b in scan_tree_for_params (s=0x29434070, e=0x296fd640, c=0x0, r=0, k=0xbfbfe888, 
    subtract=0 '\0') at ../../../git/gcc/graphite.c:2408
#4  0x089d6521 in scan_tree_for_params (s=0x29434070, e=0x296fbd80, c=0x0, r=0, k=0xbfbfe888, 
    subtract=0 '\0') at ../../../git/gcc/graphite.c:2362
#5  0x089d634a in scan_tree_for_params (s=0x29434070, e=0x296fbda4, c=0x0, r=0, k=0xbfbfe888, 
    subtract=0 '\0') at ../../../git/gcc/graphite.c:2357
#6  0x089d752a in find_scop_parameters (scop=0x29434070) at ../../../git/gcc/graphite.c:2615
#7  0x089df712 in graphite_transform_loops () at ../../../git/gcc/graphite.c:5353
#8  0x0860bd10 in graphite_transforms () at ../../../git/gcc/tree-ssa-loop.c:298
#9  0x083dba7e in execute_one_pass (pass=0x8c6a860) at ../../../git/gcc/passes.c:1279


And it seems we do not handle scev that contain something like this:
(gdb) frame 2
#2  0x089d6a49 in scan_tree_for_params (s=0x29434070, e=0x296c95c0, c=0x0, r=0, k=0xbfbfe888, 
    subtract=0 '\0') at ../../../git/gcc/graphite.c:2412
2412	      gcc_unreachable ();
(gdb) call debug_generic_expr (e)
&buf

Seems like an address.
Comment 2 Sebastian Pop 2009-01-08 03:17:15 UTC
Fixed.

This should have been fixed by the previous patches as now the
graphite branch bootstraps with BOOT_CFLAGS="-g -O2 -floop-block".
I will also enable -floop-block in -O2 in the graphite branch.

Sebastian