Bug 59610 - [4.8 Regression] ICE in parm_preserved_before_stmt_p
Summary: [4.8 Regression] ICE in parm_preserved_before_stmt_p
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ipa (show other bugs)
Version: 4.8.2
: P1 normal
Target Milestone: 4.8.3
Assignee: Martin Jambor
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-27 13:48 UTC by Jakub Jelinek
Modified: 2014-01-08 15:33 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-01-06 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2013-12-27 13:48:16 UTC
struct A { int a; };
extern void *y;

__attribute__((optimize (0))) void
foo (void *, A x)
{
  foo (y, x);
}

ICEs on 4.8 branch at -O2, starting with (likely) r190260 and fixed on the trunk with r200369.  The 4.8 version of that fix didn't fix this, since it changed only a different function.  I see 3 remaining walk_aliased_vdefs calls not guarded for !optimize in ipa-prop.c, perhaps all of them need fixing?
Comment 1 Martin Jambor 2014-01-06 17:17:18 UTC
Mine
Comment 2 Martin Jambor 2014-01-07 18:28:23 UTC
I have posted a fix to the mailing list:

http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00294.html
Comment 3 Martin Jambor 2014-01-08 15:06:25 UTC
Author: jamborm
Date: Wed Jan  8 15:06:22 2014
New Revision: 206428

URL: http://gcc.gnu.org/viewcvs?rev=206428&root=gcc&view=rev
Log:
2014-01-08  Martin Jambor  <mjambor@suse.cz>

	PR ipa/59610
	* ipa-prop.c (ipa_compute_jump_functions): Bail out if not optimizing.
	(parm_preserved_before_stmt_p): Assume modification present when not
	optimizing.

testsuite/
	* gcc.dg/ipa/pr59610.c: New test.


Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/ipa/pr59610.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/ipa-prop.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
Comment 4 Martin Jambor 2014-01-08 15:32:51 UTC
Author: jamborm
Date: Wed Jan  8 15:32:50 2014
New Revision: 206430

URL: http://gcc.gnu.org/viewcvs?rev=206430&root=gcc&view=rev
Log:
2014-01-08  Martin Jambor  <mjambor@suse.cz>

	PR ipa/59610
testsuite/
	* gcc.dg/ipa/pr59610.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/ipa/pr59610.c
Modified:
    trunk/gcc/testsuite/ChangeLog
Comment 5 Martin Jambor 2014-01-08 15:33:17 UTC
Fixed.