--- Comment #9 from matz at gcc dot gnu dot org 2010-07-26 15:06 ---
Here's a testcase (nicer in the sense of not requiring inlining) that shows
the current compiler botching the nrv - retslot optimizations:
struct S {int x, y, makemelarge[5];};
S __attribute__((noinline)) f (S s) {
--- Comment #10 from rguenth at gcc dot gnu dot org 2010-07-26 16:02
---
Subject: Bug 43784
Author: rguenth
Date: Mon Jul 26 16:01:55 2010
New Revision: 162539
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162539
Log:
2010-07-26 Richard Guenther rguent...@suse.de
PR
--- Comment #11 from rguenth at gcc dot gnu dot org 2010-07-26 16:02
---
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #8 from joseph at codesourcery dot com 2010-07-24 19:49 ---
Subject: Re: [4.6 Regression] -Os
-fkeep-inline-functions causes FAIL: gcc.c-torture/execute/builtins/pr22237.c
execution
On Fri, 23 Jul 2010, rguenth at gcc dot gnu dot org wrote:
Joseph, this is really
--- Comment #5 from rguenth at gcc dot gnu dot org 2010-07-23 11:20 ---
Confirmed. But I think this might trigger undefined behavior according to
the C standard as you are doing
v.e.b = v.d.b;
which has overlapping lhs/rhs. And we end up with
rp:
.LFB0:
.cfi_startproc
--- Comment #6 from rguenth at gcc dot gnu dot org 2010-07-23 11:36 ---
We still need to deal with it in the middle-end. I have a patch.
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #7 from rguenth at gcc dot gnu dot org 2010-07-23 11:40 ---
Hm, no. I think tree-nrv.c is correct. I was playing with
Index: gcc/tree-nrv.c
===
--- gcc/tree-nrv.c (revision 162450)
+++ gcc/tree-nrv.c
--- Comment #4 from zsojka at seznam dot cz 2010-06-11 21:02 ---
When rp() is declared with __attribute__((pure)), it fails even with
-fno-ipa-pure-const. (still fails in r160527)
I don't know if this is a bug or if this behaviour is fine according to
standard.
--
--- Comment #2 from zsojka at seznam dot cz 2010-05-22 17:11 ---
Fails with -m32 too (as of r159696)
-fno-ipa-profile doesn't help (that flag is new in r158969 compared to r158095)
The problem is that temporary struct isn't created, and direct copy *q = *p is
done. (rp is called with
--- Comment #3 from zsojka at seznam dot cz 2010-05-22 17:32 ---
-fno-ipa-pure-const prevents the problem (the code is the same as when compiled
by r158095)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43784
--- Comment #1 from zsojka at seznam dot cz 2010-04-18 16:26 ---
Created an attachment (id=20409)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20409action=view)
reduced testcase (from gcc.c-torture/execute/builtins/pr22237.c)
Command line:
gcc -Os -fkeep-inline-functions
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
Target Milestone|--- |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43784
12 matches
Mail list logo