This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/21855] New: finish in a function returning a typedef to void compiled with clang crashes GDB


https://sourceware.org/bugzilla/show_bug.cgi?id=21855

            Bug ID: 21855
           Summary: finish in a function returning a typedef to void
                    compiled with clang crashes GDB
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: simon.marchi at ericsson dot com
  Target Milestone: ---

Test program:

typedef void foo;

static foo
func ()
{
}

int
main ()
{
  func ();
  return 0;
}


Compiled with:

$ clang-3.8 test.c -o test -g3 -O0


Crashes like this:

$ ./gdb -q --data-directory=data-directory -nx test -ex "tb func" -ex r -ex fin 
Reading symbols from test...done.
Temporary breakpoint 1 at 0x400504: file test.c, line 6.
Starting program: /home/emaisin/Videos/test 

Temporary breakpoint 1, func () at test.c:6
6       }
Run till exit from #0  func () at test.c:6
/home/emaisin/src/binutils-gdb/gdb/infcmd.c:1610: internal-error: value*
get_return_value(value*, type*): Assertion `TYPE_CODE (value_type) !=
TYPE_CODE_VOID' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]