-
Notifications
You must be signed in to change notification settings - Fork 389
Closed
Labels
Backend: GCCGHDL using GCC toolchain for code generationGHDL using GCC toolchain for code generationContainers
Milestone
Description
Description
VUnit's vhdl/verification_components/src/axi_stream_monitor.vhd
can't be elaborated as soon as coverage is enabled.
Expected behaviour
That the elaboration also works with coverage enabled.
Context
...
Compiling into vunit_lib: ../usr/local/lib/python3.7/dist-packages/vunit/vhdl/verification_components/src/axi_stream_monitor.vhd failed
=== Command used: ===
/usr/local/bin/ghdl -a --workdir=/work/vunit_out/ghdl/libraries/vunit_lib --work=vunit_lib --std=08 -P/work/vunit_out/ghdl/libraries/vunit_lib -P/work/vunit_out/ghdl/libraries/osvvm -P/work/vunit_out/ghdl/libraries/t -g -fprofile-arcs -ftest-coverage /usr/local/lib/python3.7/dist-packages/vunit/vhdl/verification_components/src/axi_stream_monitor.vhd
=== Command output: ===
during IPA pass: profile
/usr/local/lib/python3.7/dist-packages/vunit/vhdl/verification_components/src/axi_stream_monitor.vhd: In function ‘vunit_lib__axi_stream_monitor__ARCH__a__axi_stream_protocol_checker_generate__B1__axi_stream_protocol_checker_inst__COMP_ELAB’:
/usr/local/lib/python3.7/dist-packages/vunit/vhdl/verification_components/src/axi_stream_monitor.vhd:35: internal compiler error: in coverage_begin_function, at coverage.c:656
35 | variable axi_stream_transaction : axi_stream_transaction_t(
|
0x609efc coverage_begin_function(unsigned int, unsigned int)
../../gcc-srcs/gcc/coverage.c:458
0xac5731 branch_prob(bool)
../../gcc-srcs/gcc/profile.c:1233
0xbff182 tree_profiling
../../gcc-srcs/gcc/tree-profile.c:793
0xbff182 execute
../../gcc-srcs/gcc/tree-profile.c:898
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
/usr/local/bin/ghdl: exec error
-
OS:
- not relevant (can be provided if required)
- Docker version 19.03.1, build 74b1e89e8a
-
Origin:
- Docker image sid-gcc-9.1.0 built on "August 5, 2019 07:46 AM"
Additional context
This does not happen with the buster-gcc-7.4.0 image
How to reproduce?
Tell us how to reproduce this issue. Please provide a Minimal Working Example (MWE), that is compatible with issue-runner. With sample code it's easier to reproduce the bug and it's much faster to fix it. For example:
#>> run.py
from os.path import join, dirname
from vunit import VUnit
ui = VUnit.from_argv()
ui.add_osvvm()
ui.add_verification_components()
ui.add_library('t').add_source_files(join(dirname(__file__), 't.vhd'))
ui.set_sim_option("enable_coverage", True)
ui.set_compile_option("ghdl.flags",["-g", "-fprofile-arcs", "-ftest-coverage"])
ui.set_sim_option("ghdl.elab_flags",["-Wl,-lgcov", "-Wl,--coverage"])
# Run vunit function
ui.main()
#>> t.vhd
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.NUMERIC_STD.all;
library vunit_lib;
context vunit_lib.vunit_context;
context vunit_lib.vc_context;
entity tb_t is
generic( runner_cfg : string );
end entity tb_t;
architecture tb of tb_t is
begin
main : process
begin
test_runner_setup(runner, runner_cfg);
info("HELLO");
test_runner_cleanup(runner);
wait;
end process;
test_runner_watchdog(runner, 100 ms);
end architecture tb;
#>> Dockerfile
FROM ghdl/ghdl:sid-gcc-9.1.0
#---
RUN apt-get update -qq \
&& apt-get -y install libgnat-8 gcc libc6-dev curl python3 python3-pip lcov git vim \
&& apt-get autoclean -y && apt-get clean -y && apt-get autoremove -y \
&& pip3 install vunit_hdl
RUN mkdir /work && chmod 777 /work
#>> run.sh
docker build -t test/ghdl:sid-gcc-9.1.0 .
docker run -v /$(pwd)://work --rm -it -w //work test/ghdl:sid-gcc-9.1.0 sh -c 'VUNIT_SIMULATOR=ghdl; python3 run.py -p 8 ;'
#>> end
I hope that's all correct :-)
Files
none
Checklist
Before submitting your issue, please review the following checklist:
- Add
GHDL Bug occurred
log block - Add a MWE
- Try the latest version
I'm not sure where the issue lies, probably also gcc, but I thought I'd start the report here.
Metadata
Metadata
Assignees
Labels
Backend: GCCGHDL using GCC toolchain for code generationGHDL using GCC toolchain for code generationContainers