[Bug debug/99230] [11 Regression] gcc.dg/pr83527.c excess errors: '-fcompare-debug' failure (length)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 24 16:59:16 GMT 2021


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
On x86_64-linux I can reproduce the *.gimple dump discrepancies with
-O2 -fcompare-debug --param logical-op-non-short-circuit=0
diff -up pr83527.c.006t.gimple pr83527.gk.c.006t.gimple 
--- pr83527.c.006t.gimple       2021-02-24 17:56:57.066963901 +0100
+++ pr83527.gk.c.006t.gimple    2021-02-24 17:56:57.536958750 +0100
@@ -3,23 +3,31 @@ void fn1 ()
   int c;
   short int d;

+  # DEBUG BEGIN_STMT
+  # DEBUG BEGIN_STMT
+  # DEBUG BEGIN_STMT
   a.0_1 = a;
   switch (a.0_1) <default: <D.1961>, case 32769: <D.1953>, case 32771:
<D.1954>, case 32772: <D.1955>, case 32782: <D.1956>, case 32800: <D.1952>>
   <D.1952>:
+  # DEBUG BEGIN_STMT
   fn2 ();
   <D.1953>:
+  # DEBUG BEGIN_STMT
   b = 0;
   <D.1954>:
   <D.1955>:
   <D.1956>:
+  # DEBUG BEGIN_STMT
   fn3 ();
   <D.1961>:
-  if (d != 0) goto <D.1962>; else goto <D.1963>;
-  <D.1963>:
-  if (c != 0) goto <D.1964>; else goto <D.1965>;
+  # DEBUG BEGIN_STMT
+  if (d != 0) goto <D.1962>; else goto <D.1964>;
   <D.1964>:
-  <D.1965>:
+  if (c != 0) goto <D.1962>; else goto <D.1963>;
   <D.1962>:
+  # DEBUG BEGIN_STMT
+  # DEBUG BEGIN_STMT
+  <D.1963>:
 }


which looks to me incorrect.
Without that param,
diff -up pr83527.c.006t.gimple pr83527.gk.c.006t.gimple 
--- pr83527.c.006t.gimple       2021-02-24 17:58:39.484841634 +0100
+++ pr83527.gk.c.006t.gimple    2021-02-24 17:58:39.967836342 +0100
@@ -3,22 +3,31 @@ void fn1 ()
   int c;
   short int d;

+  # DEBUG BEGIN_STMT
+  # DEBUG BEGIN_STMT
+  # DEBUG BEGIN_STMT
   a.0_1 = a;
   switch (a.0_1) <default: <D.1961>, case 32769: <D.1953>, case 32771:
<D.1954>, case 32772: <D.1955>, case 32782: <D.1956>, case 32800: <D.1952>>
   <D.1952>:
+  # DEBUG BEGIN_STMT
   fn2 ();
   <D.1953>:
+  # DEBUG BEGIN_STMT
   b = 0;
   <D.1954>:
   <D.1955>:
   <D.1956>:
+  # DEBUG BEGIN_STMT
   fn3 ();
   <D.1961>:
+  # DEBUG BEGIN_STMT
   _2 = d != 0;
   _3 = c != 0;
   _4 = _2 | _3;
   if (_4 != 0) goto <D.1962>; else goto <D.1963>;
   <D.1962>:
+  # DEBUG BEGIN_STMT
+  # DEBUG BEGIN_STMT
   <D.1963>:
 }

looks good.  But probably cris and x86_64 has different cswitch lowering later.


More information about the Gcc-bugs mailing list