tree-optimization/125250 - UB in testcase

Message ID 20260602124611.32BEE4BA23C6@sourceware.org
State Committed
Headers
Series tree-optimization/125250 - UB in testcase |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap fail Patch failed to apply

Commit Message

Richard Biener June 2, 2026, 12:45 p.m. UTC
  The following avoids accessing a short as _Bool.

Tested on x86_64-unknown-linux-gnu, pushed.

	PR tree-optimization/125250
	* gcc.dg/torture/pr125250.c: Declare g0 as _Bool.
---
 gcc/testsuite/gcc.dg/torture/pr125250.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gcc/testsuite/gcc.dg/torture/pr125250.c b/gcc/testsuite/gcc.dg/torture/pr125250.c
index 25d69c0e305..bd135999be3 100644
--- a/gcc/testsuite/gcc.dg/torture/pr125250.c
+++ b/gcc/testsuite/gcc.dg/torture/pr125250.c
@@ -1,7 +1,7 @@ 
 /* { dg-do run } */
 
-short g0, __chk, g9, g6;
-_Bool g1;
+short __chk, g9, g6;
+_Bool g0, g1;
 void *g4;
 
 void __attribute__((noipa)) f5(_Bool a2, int a5)