Bug 37886 - [graphite] ICE: Segmentation fault
Summary: [graphite] ICE: Segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-21 20:28 UTC by Mitul Thakkar
Modified: 2008-10-29 04:37 UTC (History)
5 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2008-10-22 21:18:54


Attachments
Reduced Test Case (136 bytes, text/plain)
2008-10-21 20:29 UTC, Mitul Thakkar
Details
Proposed fix in gloog() (383 bytes, patch)
2008-10-23 00:28 UTC, Tobias Grosser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mitul Thakkar 2008-10-21 20:28:34 UTC
gcc -c -O2 -floop-block copy_data.c

copy_data.c: In function 'copy_data':
copy_data.c:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

This was tested on the graphite branch. The reduced testcase is attached.
Comment 1 Mitul Thakkar 2008-10-21 20:29:33 UTC
Created attachment 16522 [details]
Reduced Test Case
Comment 2 Tobias Grosser 2008-10-22 21:18:54 UTC
Here a backtrace for copy_data.c:

#0  0x08194e97 in create_empty_loop_on_edge (entry_edge=0x290c2ac8, 
    initial_value=0x29066ce8, stride=0x29066d04, upper_bound=0x29066d04, iv=0x29106ec8, 
    iv_before=0xbfbfe780, outer=0x29106d10) at ../../../git/gcc/cfgloopmanip.c:684
#1  0x089d8e5c in graphite_create_new_loop (scop=0x8d320a0, entry_edge=0x290c2ac8, 
    stmt=0x8d33d00, ivstack=0xbfbfe880, outer=0x29106d10)
    at ../../../git/gcc/graphite.c:3412
#2  0x089da203 in translate_clast (scop=0x8d320a0, context_loop=0x29106d10, 
    stmt=0x8d33d00, next_e=0x290c2ac8, ivstack=0xbfbfe880)
    at ../../../git/gcc/graphite.c:3824
#3  0x089d9fad in translate_clast (scop=0x8d320a0, context_loop=0x29106d10, 
    stmt=0x8d8c5d0, next_e=0x290c2ac8, ivstack=0xbfbfe880)
    at ../../../git/gcc/graphite.c:3777
#4  0x089dc222 in gloog (scop=0x8d320a0, stmt=0x8d8c5d0)
    at ../../../git/gcc/graphite.c:4365
#5  0x089de401 in graphite_transform_loops () at ../../../git/gcc/graphite.c:5267
Comment 3 Tobias Grosser 2008-10-23 00:28:49 UTC
Created attachment 16532 [details]
Proposed fix in gloog()

I added a fix for this SEGFAULT. But now we fail with:

copy_data.c: In function 'copy_data':
copy_data.c:1: internal compiler error: in expand_scalar_variables_expr, at graphite.c:3617

This is handled in Bug 37851.

I would like to commit this fix and close this bug.
Comment 4 sebpop@gmail.com 2008-10-23 01:31:50 UTC
Subject: Re:  [graphite] ICE: Segmentation fault

On Wed, Oct 22, 2008 at 7:28 PM, grosser at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
> Proposed fix in gloog()
>
> I added a fix for this SEGFAULT. But now we fail with:
>
> copy_data.c: In function 'copy_data':
> copy_data.c:1: internal compiler error: in expand_scalar_variables_expr, at
> graphite.c:3617
>
> This is handled in Bug 37851.
>
> I would like to commit this fix and close this bug.
>

The fix looks good.  Please apply.

Sebastian
Comment 5 Tobias Grosser 2008-10-23 20:04:31 UTC
Subject: Bug 37886

Author: grosser
Date: Thu Oct 23 20:02:59 2008
New Revision: 141328

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141328
Log:
2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>

	PR middle-end/37886
	* graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit. 

Modified:
    branches/graphite/gcc/ChangeLog.graphite
    branches/graphite/gcc/graphite.c

Comment 6 Tobias Grosser 2008-10-29 04:37:07 UTC
Fix committed.