Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/pr28726.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
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 | |
7 extern void abort (void); | |
8 | |
9 static double my_loop(void) __attribute__((noinline)); | |
10 | |
11 static 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 | |
23 int main(void) | |
24 { | |
25 if (my_loop() != 13.0) | |
26 abort (); | |
27 | |
28 return 0; | |
29 } |