public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/30265] New: Compound literal can cause invalid gimple
@ 2006-12-20 5:07 pinskia at gcc dot gnu dot org
2006-12-20 5:08 ` [Bug c/30265] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-20 5:07 UTC (permalink / raw)
To: gcc-bugs
Testcase:
int f(float *);
int g(float x)
{
return f(&(float){x}) + f(&x);
}
----
When we gimplify this we get:
g (x)
{
int D.1613;
float D.1612;
int D.1614;
int D.1615;
D.1612 = x;
D.1614 = f (&D.1612);
D.1615 = f (&x);
Which is obvious invalid gimple as both D.1612 and x are non gimple registers
(and not aggergates).
--
Summary: Compound literal can cause invalid gimple
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
OtherBugsDependingO 30142
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30265
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/30265] Compound literal can cause invalid gimple
2006-12-20 5:07 [Bug c/30265] New: Compound literal can cause invalid gimple pinskia at gcc dot gnu dot org
@ 2006-12-20 5:08 ` pinskia at gcc dot gnu dot org
2007-04-21 21:47 ` pinskia at gcc dot gnu dot org
2007-04-21 21:47 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-20 5:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-12-20 05:07 -------
Mine, there is not a testcase in the GCC testsuite which tests this yet.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-12-20 05:07:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30265
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/30265] Compound literal can cause invalid gimple
2006-12-20 5:07 [Bug c/30265] New: Compound literal can cause invalid gimple pinskia at gcc dot gnu dot org
2006-12-20 5:08 ` [Bug c/30265] " pinskia at gcc dot gnu dot org
2007-04-21 21:47 ` pinskia at gcc dot gnu dot org
@ 2007-04-21 21:47 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-21 21:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-04-21 22:47 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30265
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/30265] Compound literal can cause invalid gimple
2006-12-20 5:07 [Bug c/30265] New: Compound literal can cause invalid gimple pinskia at gcc dot gnu dot org
2006-12-20 5:08 ` [Bug c/30265] " pinskia at gcc dot gnu dot org
@ 2007-04-21 21:47 ` pinskia at gcc dot gnu dot org
2007-04-21 21:47 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-21 21:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-04-21 22:47 -------
Subject: Bug 30265
Author: pinskia
Date: Sat Apr 21 22:47:35 2007
New Revision: 124024
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124024
Log:
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C/30265
* c-gimplifier.c (gimplify_compound_literal_expr): Mark the
decl as addressable if the compound literal was marked as
addressable.
Mark the decl as a gimple register if it is a complex or
vector decl and does not live in memory.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C/30265
* gcc.c-torture/compile/compound-literal-2.c: New testcase.
* gcc.c-torture/compile/compound-literal-3.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/compound-literal-2.c
trunk/gcc/testsuite/gcc.c-torture/compile/compound-literal-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-gimplify.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30265
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-21 21:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-20 5:07 [Bug c/30265] New: Compound literal can cause invalid gimple pinskia at gcc dot gnu dot org
2006-12-20 5:08 ` [Bug c/30265] " pinskia at gcc dot gnu dot org
2007-04-21 21:47 ` pinskia at gcc dot gnu dot org
2007-04-21 21:47 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).