diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cfgbuild.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr98331.c | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index 7a582d9..41654ec 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -545,6 +545,7 @@ find_bb_boundaries (basic_block bb) if the barrier were preceded by a control_flow_insn_p insn. */ if (!flow_transfer_insn) flow_transfer_insn = prev_nonnote_nondebug_insn_bb (insn); + debug_insn = NULL; } if (control_flow_insn_p (insn)) diff --git a/gcc/testsuite/gcc.dg/pr98331.c b/gcc/testsuite/gcc.dg/pr98331.c new file mode 100644 index 0000000..951b758 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr98331.c @@ -0,0 +1,18 @@ +/* PR debug/98331 */ +/* { dg-do compile } */ +/* { dg-options "-g -O2 -fcompare-debug" } */ +/* { dg-additional-options "-march=x86-64" { target { i?86-*-* x86_64-*-* } } } */ + +void bar (const char *); +unsigned long long x; + +void +foo (void) +{ + int a = 1; + bar ("foo"); + int b = 2; + __atomic_fetch_add (&x, 1, 0); + int c = 3; + __builtin_unreachable (); +} |