#2078 SIGSEGV caused by inline function returning __bit

closed-fixed
Erik Petrich
5
2013-05-25
2012-09-04
Richard Donkin
No

Compiling the attached C file causes the following error:
Caught signal 11: SIGSEGV
No other output is printed, and no files are generated.

Commenting out the 'inline' keyword before the definition of condition_func() prevents the error, but of course the function is then not inlined.

Command line used for compile:
sdcc --std-c99 -c test_bit.c

SDCC version:
SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.2.1 #8054 (Jul 30 2012) (MINGW32)

Discussion

  • Richard Donkin
    Richard Donkin
    2012-09-04

    test_bit.c

     
    Attachments
  • Erik Petrich
    Erik Petrich
    2012-09-09

    Fixed in revision #8090

     
  • Erik Petrich
    Erik Petrich
    2012-09-09

    • milestone: --> fixed
    • assigned_to: nobody --> epetrich
    • status: open --> closed-fixed
     
  • inline functions have a history of being somewhat problematic in sdcc, so I'd really like to see a regression test added for this bug.

    Philipp

     
  • Richard Donkin
    Richard Donkin
    2012-09-11

    Thank you, that was quick.

    Richard