https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120322

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
2026-01-14  Jakub Jelinek  <[email protected]>

        PR tree-optimization/120322
        * gcc.dg/torture/pr120322.c: New test.

--- gcc/testsuite/gcc.dg/torture/pr120322.c.jj  2026-01-14 14:48:43.493227255
+0100
+++ gcc/testsuite/gcc.dg/torture/pr120322.c     2026-01-14 14:48:30.445446273
+0100
@@ -0,0 +1,33 @@
+/* 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);
+}

Reply via email to