diff options
author | Christopher Bazley <chris.bazley@arm.com> | 2025-05-01 22:00:42 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2025-05-01 22:00:42 +0100 |
commit | 25921d664242f651ed8a25b3db55093a19a5ae7b (patch) | |
tree | a31f10b140de37446eb013e107daadabf5c954e4 /gcc/rust/parse/rust-cfg-parser.cc | |
parent | 87c4460024dadef0aa1c767be146ad3831857ebe (diff) | |
download | gcc-25921d664242f651ed8a25b3db55093a19a5ae7b.zip gcc-25921d664242f651ed8a25b3db55093a19a5ae7b.tar.gz gcc-25921d664242f651ed8a25b3db55093a19a5ae7b.tar.bz2 |
Fix BZ 119317: named loops (C2y) with debug info
Named loops (C2y) could not previously be compiled with
-O1 and -ggdb2 or higher because the label preceding
a loop (or switch) could not be found when using such
command lines.
This could be observed by compiling
gcc/gcc/testsuite/gcc.dg/c2y-named-loops-1.c with
the provoking command line (or any minimal example such
as that cited in the bug report).
The fix was simply to ignore the tree nodes inserted
for debugging information.
Base commit is 79aa2a283a8d3327ff4d6dca77e81d5b1ac3a01e
PR c/119317
gcc/c/ChangeLog:
* c-decl.cc (c_get_loop_names): Do not prematurely
end the search for a label that names a loop or
switch statement upon encountering a DEBUG_BEGIN_STMT.
Instead, ignore any instances of DEBUG_BEGIN_STMT.
gcc/testsuite/ChangeLog:
* gcc.dg/c2y-named-loops-8.c: New test.
Diffstat (limited to 'gcc/rust/parse/rust-cfg-parser.cc')
0 files changed, 0 insertions, 0 deletions