mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-08 19:20:44 +08:00
re PR middle-end/32964 (union cause inefficient code inside loops)
2009-08-06 Martin Jambor <mjambor@suse.cz> PR middle-end/32964 * testsuite/gcc.dg/tree-ssa/pr32964.c: New test. From-SVN: r150523
This commit is contained in:
parent
4dbf26d534
commit
5b62ee8ae3
@ -1,3 +1,8 @@
|
||||
2009-08-06 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR middle-end/32964
|
||||
* gcc.dg/tree-ssa/pr32964.c: New test.
|
||||
|
||||
2009-08-06 Uros Bizjak <ubizjak@gmail.com>
|
||||
H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
|
26
gcc/testsuite/gcc.dg/tree-ssa/pr32964.c
Normal file
26
gcc/testsuite/gcc.dg/tree-ssa/pr32964.c
Normal file
@ -0,0 +1,26 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O1 -fdump-tree-optimized" } */
|
||||
|
||||
union A
|
||||
{
|
||||
float a;
|
||||
};
|
||||
|
||||
float t(float a)
|
||||
{
|
||||
union A a1, a2, a3;
|
||||
int i;
|
||||
|
||||
a1.a = a;
|
||||
for(i = 0; i<100; i++)
|
||||
{
|
||||
a2 = a1;
|
||||
a2.a += a;
|
||||
a1 = a2;
|
||||
}
|
||||
a3 = a1;
|
||||
return a3.a;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "union" 0 "optimized"} } */
|
||||
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
Loading…
x
Reference in New Issue
Block a user