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 testcase, PR28703


Committed as obvious.

Richard.


Index: ChangeLog
===================================================================
*** ChangeLog	(revision 116128)
--- ChangeLog	(working copy)
***************
*** 1,3 ****
--- 1,9 ----
+ 2006-08-14  Richard Guenther  <rguenther@suse.de>
+ 
+ 	PR testsuite/28703
+ 	* gcc.c-torture/execute/pr28651.c: Do not use argc
+ 	to avoid optimization, instead forbid inlining.
+ 
  2006-08-14  Richard Sandiford  <richard@codesourcery.com>
  
  	PR rtl-optimization/28634
Index: gcc.c-torture/execute/pr28651.c
===================================================================
*** gcc.c-torture/execute/pr28651.c	(revision 116128)
--- gcc.c-torture/execute/pr28651.c	(working copy)
***************
*** 1,5 ****
  extern void abort (void);
! int
  foo (unsigned int u)
  {
    return (int)(u + 4) < (int)u;
--- 1,5 ----
  extern void abort (void);
! int __attribute__((noinline))
  foo (unsigned int u)
  {
    return (int)(u + 4) < (int)u;
*************** foo (unsigned int u)
*** 8,21 ****
  int
  main (int argc, char *argv[])
  {
!   unsigned int u;
! 
!   /* Run with no arguments so u will be MAX_INT and the optimizers
!      won't know its value.  */
!   if (argc > 1)
!     u = 1;
!   else
!     u = 0x7fffffff;
  
    if (foo (u) == 0)
      abort();
--- 8,14 ----
  int
  main (int argc, char *argv[])
  {
!   unsigned int u = 0x7fffffff;
  
    if (foo (u) == 0)
      abort();


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