This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
deleting unused user labels followup
- To: gcc-patches at gcc dot gnu dot org
- Subject: deleting unused user labels followup
- From: Richard Henderson <rth at cygnus dot com>
- Date: Fri, 12 May 2000 09:55:15 -0700
- References: <20000512094956.A22296@cygnus.com>
This test case was a little bogus.
By passing constants down, at -O3 the whole thing becomes one basic
block. With scheduling, the deleted labels float to the top of the
block, which makes them compare equal, which the test case checks
for and aborts.
Pass down a non-constant and the deleted label won't float so far.
r~
* gcc.c-torture/execute/990208-1.c (main): Don't pass
constants through to doit's conditional.
Index: gcc.c-torture/execute/990208-1.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/gcc.c-torture/execute/990208-1.c,v
retrieving revision 1.2
diff -c -p -d -r1.2 990208-1.c
*** 990208-1.c 1999/09/04 15:09:12 1.2
--- 990208-1.c 2000/05/12 16:50:07
***************
*** 4,9 ****
--- 4,10 ----
#ifndef NO_LABEL_VALUES
static void *ptr1, *ptr2;
+ static int i = 1;
static __inline__ void doit(void **pptr, int cond)
{
*************** static void bar(void);
*** 27,35 ****
int main()
{
! f (1);
bar();
! g (1);
#ifdef __OPTIMIZE__
if (ptr1 == ptr2)
--- 28,36 ----
int main()
{
! f (i);
bar();
! g (i);
#ifdef __OPTIMIZE__
if (ptr1 == ptr2)