testsuite/gdb.dwarf2: avoid dead code in dw2-inline-with-lexical-scope.c
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Fri, 21 May 2021 15:20:53 +0000 (17:20 +0200)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Fri, 21 May 2021 15:21:20 +0000 (17:21 +0200)
The test in gdb.dwarf2/dw2-inline-with-lexical-scope.c fails with icc.
The reason is, icc did not emit code for a dead statement, which in
turn caused some labels to be collapsed.  Fix this by replacing the
dead code with assignment to a global value.  The statement itself
does not change the test scenario.

Also fix a whitespacing problem around an assignment operator.

gdb/testsuite/ChangeLog:
2021-05-21  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

* gdb.dwarf2/dw2-inline-with-lexical-scope.c (func): Replace
a dead code with an assignment to a global var.  Fix a
whitespacing problem around an assignment operator.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.c

index 705afbaf40d9f5656c52d5830ada3c093fe05c5f..4a3f53ba33af4a433de0d6636de0b0a6e2ee10cf 100644 (file)
@@ -1,3 +1,9 @@
+2021-05-21  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
+
+       * gdb.dwarf2/dw2-inline-with-lexical-scope.c (func): Replace
+       a dead code with an assignment to a global var.  Fix a
+       whitespacing problem around an assignment operator.
+
 2021-05-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
 
        * gdb.arch/powerpc64-prologue.c: New test to exercise prologues
index ef9b71af4e04d2598dba431428c5036019cb5735..c5f42806a22ee9aa193738d494ab9a7175743dfc 100644 (file)
@@ -30,14 +30,14 @@ static void
 func ()
 { /* func prologue */
   global_num = 42;
-  int num= 42;
+  int num = 42;
   if (num > 2)
     {
       asm ("scope_label1: .globl scope_label1");
       global_value = num;
       int value = num;
       asm ("breakpoint_label: .globl breakpoint_label");
-      value += 10;
+      global_value += value;
       asm ("scope_label2: .globl scope_label2");
     }
 } /* func end */
This page took 0.04922 seconds and 4 git commands to generate.