This testcase started to be miscompiled with r16-170 and got fixed
again with r16-960.
2026-01-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/120322
* gcc.dg/torture/pr120322.c: New test.
--- /dev/null
+/* PR tree-optimization/120322 */
+/* { dg-do run } */
+/* { dg-additional-options "-fno-early-inlining" } */
+
+int a, b, c;
+
+void
+foo (int e)
+{
+ if (e > 0)
+ while (b)
+ ;
+}
+
+void
+bar (unsigned short e)
+{
+ foo (e);
+}
+
+static void
+baz (short e)
+{
+ bar (e);
+ c = a;
+}
+
+int
+main ()
+{
+ if (sizeof (int) > sizeof (short))
+ baz (-1);
+}