User account creation filtered due to spam.

Bug 48134 - [4.6 Regression] ICE: in refs_may_alias_p_1, at tree-ssa-alias.c:1085 with custom flags
Summary: [4.6 Regression] ICE: in refs_may_alias_p_1, at tree-ssa-alias.c:1085 with cu...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.7.0
: P2 normal
Target Milestone: 4.6.1
Assignee: Richard Biener
URL:
Keywords: ice-checking, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2011-03-15 13:39 UTC by Zdenek Sojka
Modified: 2011-03-28 10:22 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.5.3, 4.7.0
Known to fail: 4.6.0
Last reconfirmed: 2011-03-15 13:55:32


Attachments
reduced testcase (from gcc.dg/pr19633-1.c) (147 bytes, text/plain)
2011-03-15 13:39 UTC, Zdenek Sojka
Details
gcc46-pr48134.patch (400 bytes, patch)
2011-03-15 14:36 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2011-03-15 13:39:04 UTC
Created attachment 23663 [details]
reduced testcase (from gcc.dg/pr19633-1.c)

Maybe similiar to PR47283.

Compiler output:
$ gcc -O2 -fstack-check=specific -fno-tree-dse -fno-tree-fre -fno-tree-loop-optimize -g testcase.c
testcase.c: In function 'foo':
testcase.c:26:1: internal compiler error: in refs_may_alias_p_1, at tree-ssa-alias.c:1085
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r170964 - crash
4.6 r170955 - crash
4.5 r170955 - OK
Comment 1 Richard Biener 2011-03-15 13:55:32 UTC
Confirmed.

(gdb) call debug_rtx (mem)
(mem/s/j/c:SI (plus:DI (debug_expr:DI D#3)
        (const_int -12 [0xfffffffffffffff4])) [0 MEM[(struct S *)&t.s].z+0 S4 A32])

invalid MEM_EXPR again.
Comment 2 Richard Biener 2011-03-15 13:59:05 UTC
That's the COMPONENT_REF case which runs into get_inner_reference which
doesn't deal with invalid MEM_REFs either.  It returns t.s as base.
Comment 3 Jakub Jelinek 2011-03-15 14:36:39 UTC
Created attachment 23664 [details]
gcc46-pr48134.patch

This fixes it, though perhaps as discussed earlier we want to fold everything in expand_debug_expr except for memory addresses or something similar.

For 4.6 this is low priority, as with --enable-checking=release it will just work, so doesn't need to be fixed before 4.6.0 release.
Comment 4 Richard Biener 2011-03-17 14:59:04 UTC
Author: rguenth
Date: Thu Mar 17 14:59:00 2011
New Revision: 171098

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171098
Log:
2011-03-17  Richard Guenther  <rguenther@suse.de>

	PR middle-end/48134
	* tree-ssa.c (insert_debug_temp_for_var_def): If we propagated
	a value make sure to fold the statement.

	* gcc.dg/pr48134.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/pr48134.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa.c
Comment 5 Richard Biener 2011-03-17 14:59:42 UTC
Fixed on trunk sofar.
Comment 6 Jakub Jelinek 2011-03-25 19:52:26 UTC
GCC 4.6.0 is being released, adjusting target milestone.
Comment 7 Richard Biener 2011-03-28 10:14:41 UTC
Author: rguenth
Date: Mon Mar 28 10:14:34 2011
New Revision: 171595

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171595
Log:
2011-03-28  Richard Guenther  <rguenther@suse.de>

	Backport from mainline
	2011-03-24  Richard Guenther  <rguenther@suse.de>

	PR middle-end/48269
	* tree-object-size.c (addr_object_size): Do not double-account
	for MEM_REF offsets.

	* gcc.dg/builtin-object-size-10.c: New testcase.

	2011-03-22  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/48228
	* tree-vrp.c (vrp_visit_phi_node): Do not stop propagating
	for single-arg PHIs.

	* gcc.dg/Wstrict-overflow-23.c: New testcase.

	2011-03-17  Richard Guenther  <rguenther@suse.de>

	PR middle-end/48134
	* tree-ssa.c (insert_debug_temp_for_var_def): If we propagated
	a value make sure to fold the statement.

	* gcc.dg/pr48134.c: New testcase.

	2011-03-15  Richard Guenther  <rguenther@suse.de>

	PR middle-end/48031
	* fold-const.c (fold_indirect_ref_1): Do not create new variable-sized
	or variable-indexed array accesses when in gimple form.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/Wstrict-overflow-23.c
    branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/builtin-object-size-10.c
    branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/pr48134.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/fold-const.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_6-branch/gcc/tree-object-size.c
    branches/gcc-4_6-branch/gcc/tree-ssa.c
    branches/gcc-4_6-branch/gcc/tree-vrp.c
Comment 8 Richard Biener 2011-03-28 10:22:30 UTC
Fixed.