http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54793



Frank Ch. Eigler <fche at redhat dot com> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |tromey at redhat dot com

           Severity|normal                      |major



--- Comment #3 from Frank Ch. Eigler <fche at redhat dot com> 2013-01-18 
16:01:24 UTC ---

A little longer test case (which requires a location_list rather than location

for all the parameters) shows that gdb is adversely affected by this bug too;

its prologue-finding is no help:



% cat foo2.c 



int foo (int a, int b) __attribute__((noinline));

int bar (int c, int d) __attribute__((noinline));



int bar (int c, int d)

{

  while (c-- > d++) ;

}



int foo (int a, int b)

{

  asm volatile ("nop");

  return bar (a, b);

}



int main () {

  return foo (7, 4);

}



% gcc -g -O2 -mfentry foo2.c -p

% gdb a.out

(gdb) break foo

Breakpoint 1 at 0x400660: file foo2.c, line 11.

(gdb) run

Starting program: /tmp/a.out 



Breakpoint 1, foo (a=<optimized out>, b=<optimized out>) at foo2.c:11

11    {

Reply via email to