Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/torture/pr94392.c @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
rev | line source |
---|---|
152 | 1 /* { dg-do compile } */ |
2 /* { dg-skip-if "finite loops" { *-*-* } { "-ffinite-loops" } } */ | |
3 /* { dg-skip-if "LTO optimizes the test" { *-*-* } { "-flto" } } */ | |
4 /* { dg-additional-options "-fdump-tree-optimized" } */ | |
5 | |
6 int a, b; | |
7 | |
8 int | |
9 main() | |
10 { | |
11 while (1) | |
12 { | |
13 /* Try really hard. */ | |
14 if (a != b) | |
15 return 1; | |
16 } | |
17 return 0; | |
18 } | |
19 | |
20 /* ISO C does not guarantee forward progress like C++ does so we | |
21 cannot assume the loop is finite and optimize it to return 1. */ | |
22 /* { dg-final { scan-tree-dump "if" "optimized" } } */ |