Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/volatile-1.c

raw
1 /* { dg-additional-options "-std=gnu89" } */
2
3 /* The problem here was that the statements that
4 loaded from exception.reason where not being
5 marked as having volatile behavior which
6 caused load PRE on the tree level to go
7 into an infinite loop. */
8
9 struct gdb_exception
10 {
11 int reason;
12 };
13 int catch_exceptions_with_msg (int *gdberrmsg)
14 {
15 volatile struct gdb_exception exception;
16 exceptions_state_mc_init (&(exception));
17 if (exception.reason != 0)
18 foo ();
19 return exception.reason;
20 }