https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114052
--- Comment #25 from rguenther at suse dot de <rguenther at suse dot de> --- On Mon, 14 Apr 2025, vvinayag at arm dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114052 > > --- Comment #24 from vvinayag at arm dot com --- > (In reply to rguent...@suse.de from comment #23) > > On Fri, 11 Apr 2025, vvinayag at arm dot com wrote: > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114052 > > > > > > --- Comment #22 from vvinayag at arm dot com --- > > > (In reply to rguent...@suse.de from comment #19) > > > > On Thu, 6 Mar 2025, vvinayag at arm dot com wrote: > > > > > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114052 > > > > > > > > > > vvinayag at arm dot com changed: > > > > > > > > > > What |Removed |Added > > > > > ---------------------------------------------------------------------------- > > > > > CC| |vvinayag at arm dot > > > > > com > > > > > > > > > > --- Comment #18 from vvinayag at arm dot com --- > > > > > (In reply to GCC Commits from comment #17) > > > > > > The releases/gcc-14 branch has been updated by Richard Biener > > > > > > <rgue...@gcc.gnu.org>: > > > > > > > > > > > > https://gcc.gnu.org/g:c886bd9ab21429a11bea393b5a6e7438a1d924ef > > > > > > > > > > > > commit r14-11329-gc886bd9ab21429a11bea393b5a6e7438a1d924ef > > > > > > Author: Richard Biener <rguent...@suse.de> > > > > > > Date: Wed Jan 29 13:25:14 2025 +0100 > > > > > > > > > > > > tree-optimization/114052 - consider infinite sub-loops when > > > > > > lowering > > > > > > iter bound > > > > > > > > > > > > When we walk stmts to find always executed stmts with UB in the > > > > > > last > > > > > > iteration to be able to reduce the iteration count by one we > > > > > > fail > > > > > > to consider infinite subloops in the last iteration that would > > > > > > make > > > > > > such stmt not execute. The following adds this. > > > > > > > > > > > > PR tree-optimization/114052 > > > > > > * tree-ssa-loop-niter.cc (maybe_lower_iteration_bound): > > > > > > Check > > > > > > for infinite subloops we might not exit. > > > > > > > > > > > > * gcc.dg/pr114052-1.c: New testcase. > > > > > > > > > > > > > > > For bare-metal targets (aarch64-none-elf, arm-none-eabi), > > > > > gcc.dg/pr114052-1.c > > > > > seems to be UNSUPPORTED in trunk. > > > > > However, when using releases/gcc-14, gcc.dg/pr114052-1.c FAILs with > > > > > this > > > > > message: > > > > > > > > > > pr114052-1.c:(.text.startup+0x24): undefined reference to `sigaction' > > > > > collect2: error: ld returned 1 exit status > > > > > compiler exited with status 1 > > > > > FAIL: gcc.dg/pr114052-1.c (test for excess errors) > > > > > Excess errors: > > > > > pr114052-1.c:(.text.startup+0x24): undefined reference to `sigaction' > > > > > > > > > > > > > > > I am not sure whether this is related, but when I had a look to see > > > > > what's > > > > > different between the patches in trunk and gcc-14: > > > > > The patch in trunk has an additional requirement on alarm: > > > > > /* { dg-require-effective-target alarm } */ > > > > > > > > Yep, that doesn't exist on the branch. > > > > > > Is this new testcase (gcc.dg/pr114052-1.c) meant to be unsupported on > > > gcc-13 > > > and gcc-14, like it is unsupported on trunk? > > > > On a target w/o 'alarm'? Yes. > > gcc.dg/pr114052-1.c tests are failing in gcc-13 and gcc-14. > > Is it the case that the testcase in gcc-13 and gcc-14 is missing the > requirement on alarm: > /* { dg-require-effective-target alarm } */ The testcase harness does not implement this on branches.