Assignee: unassigned at gcc dot gnu.org
Reporter: massarelli at diag dot uniroma1.it
Target Milestone: ---
After executing function a, line 9 is wrongly hit.
$ cat -n a.c
cat -n aa.c
1 int d;
2 char a() { return 0; }
3 char f(b, c) {}
4 void e() {
5int h
Assignee: unassigned at gcc dot gnu.org
Reporter: massarelli at diag dot uniroma1.it
Target Milestone: ---
When line 5 is hit for the second time gdb shows function b in the top of the
backtrace while line 5 belong to function main.
$ cat -n a.c
1 int a;
2 void b
Assignee: unassigned at gcc dot gnu.org
Reporter: massarelli at diag dot uniroma1.it
Target Milestone: ---
$ cat a.c
int a;
void b() {
short l_196 = a = 0;
a+1;
}
int main() { b(); }
$ cat -n a.c
1 int a;
2 void b() {
3 short l_196 = a = 0;
4 a+1;
5 }
6 int main() { b(); }
7
When
Assignee: unassigned at gcc dot gnu.org
Reporter: massarelli at diag dot uniroma1.it
Target Milestone: ---
$ cat a.c
int g_4 = 3, a;
int *b() {
if (g_4)
return &g_4; //line 4
a = 0;
return &g_4; //line 6
}
$ cat -n a.c
1 int g_4 = 3, a;
2 int *b() {
3
Assignee: unassigned at gcc dot gnu.org
Reporter: massarelli at diag dot uniroma1.it
Target Milestone: ---
Line information is wrong at line 6.
Line 6 should not be hit as it is the declaration of variables.
>From the disassembly, it seems that the program is actually executing lin
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: massarelli at diag dot uniroma1.it
Target Milestone: ---
Variable l_9 is visible when the debugger hit line 4.
$ cat a.c
int g_2, a;
int b() {
char l_10;
for (g_2 = 21; (g_2 < (-27)); g_2 = 0)
return
Assignee: unassigned at gcc dot gnu.org
Reporter: massarelli at diag dot uniroma1.it
Target Milestone: ---
At line 14 it seems that backtrace information is wrong (pointing at function
dm).
$ cat a.c
static int a, c, d, e;
static void dm() {
int b = 0;
for (; b < 56; b++)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95047
--- Comment #2 from Luca Massarelli ---
Ok, so it seems that there is an inconsistency with -Og:
$ gcc -Og -g -o opt a.c
$ lldb opt
* thread #1, name = 'opt', stop reason = breakpoint 1.1
frame #0: 0x004004bb opt`main at a.c:13:9
: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: massarelli at diag dot uniroma1.it
Target Milestone: ---
Debug information for ternary operator seems wrong at O0.
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/bin/../libexec/gcc/x86_64