Bug 44377 - ICE: gimple check: expected gimple_return(error_mark), have gimple_call() in gimple_return_retval, at gimple.h:4311 with -fipa-pta
Summary: ICE: gimple check: expected gimple_return(error_mark), have gimple_call() in ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Richard Biener
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 11:23 UTC by Zdenek Sojka
Modified: 2010-06-02 12:27 UTC (History)
1 user (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-06-02 12:20:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2010-06-02 11:23:36 UTC
Command line:
$ gcc -O1 -fipa-pta testcase.c

----- testcase.c -----
int foo ()
{
  __builtin_return (foo);
}
----------------------

Tested revisions:
r160122 - crash
r159696 - OK

Compiler output:
$ gcc -O1 -fipa-pta testcase.c
testcase.c: In function 'foo':
testcase.c:4:1: internal compiler error: gimple check: expected gimple_return(error_mark), have gimple_call() in gimple_return_retval, at gimple.h:4311
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Zdenek Sojka 2010-06-02 12:18:50 UTC
The testcase was reduced from gcc.dg/torture/stackalign/builtin-return-1.c, which is valid. It can be further reduced to:

void foo () { __builtin_return (0); }

In general, it seems any use of __builtin_return() with -fipa-pta ICEs.
Comment 2 Richard Biener 2010-06-02 12:20:19 UTC
Mine.
Comment 3 Richard Biener 2010-06-02 12:27:29 UTC
Fixed.
Comment 4 Richard Biener 2010-06-02 12:27:59 UTC
Subject: Bug 44377

Author: rguenth
Date: Wed Jun  2 12:27:24 2010
New Revision: 160152

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160152
Log:
2010-06-02  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/44377
	* tree-ssa-structalias.c (find_func_aliases): Fix typo.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-structalias.c