Bug 115322 - SPEC2006 403.gcc internal error
Summary: SPEC2006 403.gcc internal error
Status: WAITING
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 14.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: needs-source, wrong-code
Depends on:
Blocks: spec
  Show dependency treegraph
 
Reported: 2024-06-03 06:09 UTC by 孙东亚
Modified: 2024-10-31 03:59 UTC (History)
0 users

See Also:
Host:
Target: riscv
Build:
Known to work:
Known to fail:
Last reconfirmed: 2024-06-03 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 孙东亚 2024-06-03 06:09:31 UTC
Hi,

GCC version: 
gcc version 14.1.1 20240507 (g7e8fae89f)  

Build SPEC2006 cfg1: 
 
# Compiler selection

CC  = riscv64-unknown-linux-gnu-gcc      -march=rv64imafdcv_zba_zbb_zbc_zbs_zvl128b -mabi=lp64d  -static -mrvv-vector-bits=zvl -mrvv-max-lmul=m1 
CXX = riscv64-unknown-linux-gnu-g++      -march=rv64imafdcv_zba_zbb_zbc_zbs_zvl128b -mabi=lp64d  -static -mrvv-vector-bits=zvl -mrvv-max-lmul=m1 
FC  = riscv64-unknown-linux-gnu-gfortran -march=rv64imafdcv_zba_zbb_zbc_zbs_zvl128b -mabi=lp64d  -static -mrvv-vector-bits=zvl -mrvv-max-lmul=m1   

# Optimization

default=base=default=default:
COPTIMIZE      = -Ofast -flto 
CXXOPTIMIZE    = -Ofast -flto
FOPTIMIZE      = -Ofast -flto 

# 32/64 bit Portability Flags - all  
default=base=default=default:
PORTABILITY    = -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=declaration-missing-parameter-type -Wno-error=return-mismatch -Wno-error=int-conversion -Wno-error=incompatible-pointer-types -DSPEC_CPU_LP64   

Build SPEC2006 cfg2: 
 
# Compiler selection

CC  = riscv64-unknown-linux-gnu-gcc      -march=rv64imafdcv_zba_zbb_zbc_zbs_zvl128b -mabi=lp64d  -static -mrvv-vector-bits=zvl -mrvv-max-lmul=m4 
CXX = riscv64-unknown-linux-gnu-g++      -march=rv64imafdcv_zba_zbb_zbc_zbs_zvl128b -mabi=lp64d  -static -mrvv-vector-bits=zvl -mrvv-max-lmul=m4
FC  = riscv64-unknown-linux-gnu-gfortran -march=rv64imafdcv_zba_zbb_zbc_zbs_zvl128b -mabi=lp64d  -static -mrvv-vector-bits=zvl -mrvv-max-lmul=m4   

# Optimization

default=base=default=default:
COPTIMIZE      = -Ofast -flto 
CXXOPTIMIZE    = -Ofast -flto
FOPTIMIZE      = -Ofast -flto 

# 32/64 bit Portability Flags - all  
default=base=default=default:
PORTABILITY    = -Wno-error=implicit-int -Wno-error=implicit-function-declaration -Wno-error=declaration-missing-parameter-type -Wno-error=return-mismatch -Wno-error=int-conversion -Wno-error=incompatible-pointer-types -DSPEC_CPU_LP64  



After successfully compiling SPEC2006 using the above configuration, the following problem will occur in 403.gcc when running the intspeed/test data set.

gcc_base.riscv: internal error: 4
It is possible that you may be trying to use SPEC's version of gcc
without first defining the appropriate flags.  Please check the flags
that are in the config files from recently-published results on your
platform, and check that you are using an up-to-date compiler.  If
you still need help, please contact SPEC, reporting your hw/os
platform, your compiler version, and your compilation flags.
Contact SPEC at <URL:http://www.spec.org/>

Similar error will occur when running the simulation in user mode in qemu. The running command is as follows:  

# qemu version  
qemu-riscv64 version 8.2.93 (v9.0.0-rc3-5-g824ebb92c3)  

#running command
qemu-riscv64 -cpu rv64,v=true,vext_spec=v1.0,zicond=true ./gcc_base.riscv cccp.in -o cccp.s  

cccp.in:1679: internal error: 11
It is possible that you may be trying to use SPEC's version of gcc
without first defining the appropriate flags.  Please check the flags
that are in the config files from recently-published results on your
platform, and check that you are using an up-to-date compiler.  If
you still need help, please contact SPEC, reporting your hw/os
platform, your compiler version, and your compilation flags.
Contact SPEC at <URL:http://www.spec.org/>
Comment 1 Andrew Pinski 2024-06-03 06:16:34 UTC
Does adding -fno-strict-aliasing help?
Comment 2 孙东亚 2024-06-04 08:27:09 UTC
(In reply to Andrew Pinski from comment #1)
> Does adding -fno-strict-aliasing help?

After adding this compilation option, the same error will still be reported