This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/39331] New: OpenMP and return-slot-optimization generate invalid gimple
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2009 16:58:55 -0000
- Subject: [Bug tree-optimization/39331] New: OpenMP and return-slot-optimization generate invalid gimple
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
from libgomp.c++/pr27337.C at -O3 we get in 042i.inline
ret.12_15 = &x.8;
.omp_data_o.11.ret ={v} ret.12_15;
__builtin_GOMP_parallel_start (_Z3barv.omp_fn.0, &.omp_data_o.11, 4);
_Z3barv.omp_fn.0 (&.omp_data_o.11);
__builtin_GOMP_parallel_end ();
ret.13_16 = .omp_data_o.11.ret;
&x.8 = ret.13_16;
in main() from inlining foo() here:
<bb 8>:
x.8 ={v} bar (); [return slot optimization]
x ={v} x.8;
where bar () looks like
S bar() ()
{
struct S & ret.5;
struct .omp_data_s.10 .omp_data_o.11;
struct S & ret.12;
struct S & ret.13;
<bb 2>:
ret.5_1 = <retval>;
__comp_ctor (ret.5_1);
ret.12_2 = <retval>;
.omp_data_o.11.ret ={v} ret.12_2;
__builtin_GOMP_parallel_start (_Z3barv.omp_fn.0, &.omp_data_o.11, 4);
_Z3barv.omp_fn.0 (&.omp_data_o.11);
__builtin_GOMP_parallel_end ();
ret.13_3 = .omp_data_o.11.ret;
<retval> ={v} ret.13_3;
return <retval>;
}
which is no longer in a form suitable for RSO.
The wrong-gimple is not catched by any verification at the moment (huh...)
but will ICE momentarily during PTA on the alias-improvements branch.
I didn't check if this is in any way a regression.
--
Summary: OpenMP and return-slot-optimization generate invalid
gimple
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39331