Bug 47313 - [4.6 Regression] ICE: PHI argument is not a GIMPLE value
Summary: [4.6 Regression] ICE: PHI argument is not a GIMPLE value
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Richard Biener
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-16 09:33 UTC by Marc Glisse
Modified: 2011-01-17 14:48 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-01-16 18:08:47


Attachments
testcase (569 bytes, text/x-c++src)
2011-01-16 09:35 UTC, Marc Glisse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Glisse 2011-01-16 09:33:27 UTC
$ g++ -O2 -c a.cc
a.cc: In function 'Periodic_3_Delaunay_triangulation_3< <template-parameter-1-1> >::Vertex_handle Periodic_3_Delaunay_triangulation_3< <template-parameter-1-1> >::nearest_vertex() const [with <template-parameter-1-1> = Triangulation_data_structure_3, Periodic_3_Delaunay_triangulation_3< <template-parameter-1-1> >::Vertex_handle = internal::CC_iterator<Compact_container<int>, false>]':
a.cc:51:1: error: PHI argument is not a GIMPLE value
iftmp.0_2 = PHI <<retval>(2), D.2301_3(D)(3)>

<retval>
a.cc:51:1: internal compiler error: verify_stmts failed
Comment 1 Marc Glisse 2011-01-16 09:35:27 UTC
Created attachment 22981 [details]
testcase

Try again to attach it, bugzilla apparently failed to upload it in the initial bug report.
Comment 2 H.J. Lu 2011-01-16 18:08:47 UTC
It is caused by revision 161898:

http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg00252.html
Comment 3 Richard Biener 2011-01-17 12:06:36 UTC
For some reason IPA-SRA breaks it.  Looking at it.
Comment 4 Richard Biener 2011-01-17 14:48:38 UTC
Author: rguenth
Date: Mon Jan 17 14:48:35 2011
New Revision: 168907

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

	PR tree-optimization/47313
	* tree-inline.c (tree_function_versioning): Move DECL_RESULT
	handling before copying the body.  Properly deal with
	by-reference result in SSA form.

	* g++.dg/torture/pr47313.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr47313.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-inline.c
Comment 5 Richard Biener 2011-01-17 14:48:47 UTC
Fixed.