On Thu, Jul 12, 2018 at 8:56 AM, Pierre-Marie de Rodat <dero...@adacore.com> wrote: > I don’t have much more to say than debug11.adb’s comment ;-) > >> This testcase checks that in the DWARF description of the variant type >> below, the C discriminant is properly described as unsigned, hence the >> 0x5a >> ('Z') and 0x80 (128) values in the DW_AT_discr_list attribute. If it was >> described as signed, we would have instead 90 and -128. > > I don’t have an Ada RISC-V compiler (nor binutils) to check right now: would > it be possible to send the corresponding debug11.s and debug11.o? Hopefully > we just have to enhance the regexps.
I poked at this a little and noticed a difference between the x86_64 support and the RISC-V support. The RISC-V C language port has char as unsigned by default. The x86_64 port has char signed by default. If I add a -fsigned-char option, then the testcase works as expected for RISC-V. Curiously, the Ada compiler accepts -fsigned-char but not -funsigned-char. I tried hacking in a -funsigned-char flag, but when I use it with the x86_64 port the result is still correct. Maybe my quick hack wasn't quite right. Anyways, the default signedness of char has something to do with the problem. Jim