1/* PR rtl-optimization/28726 */ 2/* Origin: Sigurd Schneider <sg313d@gmail.com> */ 3 4/* { dg-do run } */ 5/* { dg-options "-O2 -fsched2-use-superblocks" } */ 6 7extern void abort (void); 8 9static double my_loop(void) __attribute__((noinline)); 10 11static double my_loop(void) 12{ 13 double retval = 0.0; 14 const unsigned char *start = "\005\b\000"; 15 const unsigned char *const end = start + 2; 16 17 while (start < end) 18 retval += *start++; 19 20 return retval; 21} 22 23int main(void) 24{ 25 if (my_loop() != 13.0) 26 abort (); 27 28 return 0; 29} 30