This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33136] [4.2/4.3 Regression] -Os generated code grew almost twice 4.2.1 versus 4.1.1
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Aug 2007 13:54:49 -0000
- Subject: [Bug tree-optimization/33136] [4.2/4.3 Regression] -Os generated code grew almost twice 4.2.1 versus 4.1.1
- References: <bug-33136-12956@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from jakub at gcc dot gnu dot org 2007-08-22 13:54 -------
Even shorter testcase:
/* { dg-do run } */
/* { dg-options "-O2" } */
extern void abort (void);
struct S
{
struct S *a;
int b;
};
#ifdef VAR
struct S t;
#endif
int
main (void)
{
struct S *s = (struct S *) 0, **p, *n;
for (p = &s; *p; p = &(*p)->a);
n = (struct S *) __builtin_alloca (sizeof (*n));
n->a = *p;
n->b = 1;
*p = n;
if (!s)
abort ();
return 0;
}
This one behaves identically with 4.1/4.2/trunk, -O2 -UVAR -> abort,
-O2 -DVAR -> success, -O2 -fno-strict-aliasing -UVAR -> success.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33136