This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR40247


This fixes the PR by obfuscating the testcase to avoid it being
optimized to an empty function before struct-reorg does run.
With early PTA we can do a lot more dead code removal than before.


Tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2009-05-26  Richard Guenther  <rguenther@suse.de>

	PR testsuite/40247
	* gcc.dg/struct/wo_prof_escape_substr_pointer.c: Obfuscate.

Index: gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_pointer.c
===================================================================
*** gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_pointer.c	(revision 147862)
--- gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_pointer.c	(working copy)
*************** typedef struct
*** 24,29 ****
--- 24,31 ----
    int c;
  }str_with_substr_t;
  
+ int foo;
+ 
  int
  main (void)
  {
*************** main (void)
*** 37,42 ****
--- 39,46 ----
    for (i=0; i < N; i++)
      A[i].sub_str->a = 5;
  
+   foo = A[56].sub_str->a;
+ 
    return 0;
  }
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]