Hi Tristan, I'm building the GCC backend with Debian sources for gcc-4.9.2. My Ada compiler is GNAT 4.9.2 and my C compiler is GCC 4.9.2.
The "range check" issue is only about 50% reproducible. When I repeatedly run the command to compile memory_p.vhdl on my command line, about 50% of the time it succeeds without messages and about 50% of the time it crashes on "range check failed" at trans-rtis.adb line 1633. When I run GHDL within GDB, it fails 0% of the time. If the error occurs, GHDL itself prints a stack trace in hex codes. But I don't understand what these codes represent. They apparently don't exist as addresses in the program; addr2line does not return anything and GDB says it can not access the addresses. I don't understand this, but then again I don't understand Ada. I can build GHDL with the LLVM backend without problems. However, if I use the LLVM-based GHDL binary to build memory_p.vhd with the same command-line arguments as used during the GHDL-GCC build process, it crashes 100% of the time. It appears that the "-g" option to GHDL triggers the error. Without "-g" the command always succeeds, with "-g" the command always fails on range check error. For example: /data/tmp/ghdl/bin/ghdl -a --ieee=none --std=93 -P../std --work=ieee ../../src/vital2000/memory_p.vhdl (success) /data/tmp/ghdl/bin/ghdl -a --ieee=none -g --std=93 -P../std --work=ieee ../../src/vital2000/memory_p.vhdl Message: trans-rtis.adb:1633 range check failed Call stack traceback locations: 0x4fbddf 0x4fc8d1 0x4fceba 0x4fedbd 0x500171 0x501735 0x5a01c4 0x54bf99 0x5ae0bf 0x46d79f 0x4320c6 0x7f0b3b415b43 0x431510 0xfffffffffffffffe The hex addresses in the LLVM can be translated by addr2line: ghdl-updates-code/src/vhdl/sem_names.adb:2835 (discriminator 4) ghdl-updates-code/src/vhdl/sem_names.adb:2969 (discriminator 4) ghdl-updates-code/src/vhdl/sem_names.adb:3049 ghdl-updates-code/src/vhdl/sem_names.adb:3775 (discriminator 4) ghdl-updates-code/src/vhdl/sem_assocs.adb:214 ghdl-updates-code/src/vhdl/sem_assocs.adb:572 (discriminator 2) ??:0 ??:0 ??:0 ghdl-updates-code/./src/vhdl/scanner-scan_literal.adb:156 (discriminator 6) ghdl-updates-code/src/vhdl/iirs.adb:4921 ??:0 ghdl-updates-code/src/vhdl/iirs.adb:4753 (discriminator 1) ??:0 I know this is confusing, I'm sorry. Joris. On 2015-09-13, Tristan Gingold wrote: > On 13/09/15 14:27, Joris van Rantwijk wrote: > > > > Building GHDL from the Sourceforge mercurial snapshot failed on my system. > > > > I try to build the GCC backend for x86-64, using the gcc-4.9.2 sources > > under Debian 8.1. > > The ghdl binary itself builds fine, but the process fails later during > > compilation of the VHDL libraries. > > I don't hit that issue. > Which compiler are you using to build ghdl ? > I suppose this is with gcc 4.9.2. > > Try to run ghdl1 within gdb and use 'catch exception' to stop on the > error. The backtrace would be useful. > > Tristan. _______________________________________________ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss