aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.c
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2021-05-21 17:20:53 +0200
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2021-05-21 17:21:20 +0200
commitca43e66033ca0d72bb93837c9b1ab482977e06e6 (patch)
treeb061550a758098d8cdf0a680d0dee229320b6fa2 /gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.c
parent6d1a09b77a9ab52d9fc627b8f5eb952892c81f90 (diff)
downloadbinutils-ca43e66033ca0d72bb93837c9b1ab482977e06e6.zip
binutils-ca43e66033ca0d72bb93837c9b1ab482977e06e6.tar.gz
binutils-ca43e66033ca0d72bb93837c9b1ab482977e06e6.tar.bz2
testsuite/gdb.dwarf2: avoid dead code in dw2-inline-with-lexical-scope.c
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.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.c')
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.c b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.c
index ef9b71a..c5f4280 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.c
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.c
@@ -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 */