Bug 2265489

Summary: test miscompiled with -O2 -fopenmp-simd
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmalcolm, fweimer, jakub, jlaw, josmyers, jwakely, mcermak, mpolacek, msebor, nickc, nixuser, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-14.0.1-0.8.fc41 gcc-14.0.1-0.8.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-03-23 00:24:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 467765, 2261693    
Attachments:
Description Flags
preprocessed sources none

Description Dan Horák 2024-02-22 10:33:52 UTC
Some tests for the SIMDe project started to fail with gcc-14.0.1-0.7.fc41.s390x, but there is no such problem with gcc-13.2.1-4.fc38.s390x. Going from -O2 to -O0 makes test to pass (still fails with -O1).

Reproducible: Always

Steps to Reproduce:
1. cc -O2 -fopenmp-simd -o addv-minimal.o -c addv-minimal.i
2. cc  -o addv-minimal addv-minimal.o -lm
3. ./addv-minimal
Actual Results:  
1..1
../test/arm/neon/addv-minimal.c:36: assertion failed: r ~= test_vec[i].r (0.000000 ~= -1780.969971)
not ok 1 addv/vaddvq_f32


Expected Results:  
no assertion

Comment 1 Dan Horák 2024-02-22 10:34:17 UTC
Created attachment 2018136 [details]
preprocessed sources

Comment 2 Dan Horák 2024-02-22 10:42:18 UTC
The test also passes when OpenMP is not used with the original C source file.

Comment 3 Dan Horák 2024-02-29 10:38:18 UTC
successfully verified with simde rebuild

Comment 4 Fedora Update System 2024-02-29 10:58:40 UTC
FEDORA-2024-04a26a52c4 (gcc-14.0.1-0.8.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-04a26a52c4

Comment 5 Fedora Update System 2024-03-01 01:57:04 UTC
FEDORA-2024-04a26a52c4 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-04a26a52c4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-04a26a52c4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2024-03-23 00:24:44 UTC
FEDORA-2024-04a26a52c4 (gcc-14.0.1-0.8.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.