Bug 2336449 - cbmc fails to build with GCC 15 (C23?)
Summary: cbmc fails to build with GCC 15 (C23?)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: cbmc
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lukáš Zaoral
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2339958 (view as bug list)
Depends On:
Blocks: F41FTBFS F42FTBFS gcc-15-mass-prebuild
TreeView+ depends on / blocked
 
Reported: 2025-01-08 20:05 UTC by Dave Malcolm
Modified: 2025-04-24 12:35 UTC (History)
4 users (show)

Fixed In Version: cbmc-6.5.0-1.fc43
Clone Of:
Environment:
Last Closed: 2025-04-24 12:35:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2025-01-08 20:05:29 UTC
I'm experimentally rebuilding rawhide with the not-yet-released GCC 15 to see if anything breaks, and to help write the porting guide.  See https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15

My test build with GCC 15 failed on x86_64:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed/build/8476160/

whereas my test build with GCC 14 succeeded:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed.checker/build/8478154/

Looking at the failure log
https://download.copr.fedorainfracloud.org/results/dmalcolm/gcc-15-smoketest-3.failed/fedora-rawhide-x86_64/08476160-cbmc/builder-live.log.gz
I see various errors, such as:

Tests failed
  4 of 252 tests failed, 19 tests skipped


Failed test: Header_files1/test.desc
/usr/lib/gcc/x86_64-redhat-linux/15/include/stddef.h:450:1: error: failed to find symbol 'nullptr'
   typedef __typeof__(nullptr) nullptr_t;
CONVERSION ERROR

EXIT=1
SIGNAL=0



Failed Header_files1/test.desc lines:
^EXIT=0$ [FAILED]
^CONVERSION ERROR$ [FAILED]


Failed test: gcc_builtins6/test.desc
/usr/lib/gcc/x86_64-redhat-linux/15/include/stddef.h:450:1: error: failed to find symbol 'nullptr'
   typedef __typeof__(nullptr) nullptr_t;
CONVERSION ERROR

EXIT=1
SIGNAL=0



Failed gcc_builtins6/test.desc lines:
^EXIT=0$ [FAILED]
^CONVERSION ERROR$ [FAILED]


Failed test: human-readable-error-on-wrong-main-signature/test.desc
/usr/lib/gcc/x86_64-redhat-linux/15/include/stddef.h:450:1: error: failed to find symbol 'nullptr'
   typedef __typeof__(nullptr) nullptr_t;
CONVERSION ERROR

EXIT=1
SIGNAL=0



Failed human-readable-error-on-wrong-main-signature/test.desc lines:
'main' with signature .* found [FAILED]


Failed test: linking_contracts1/test.desc
header.h: In function 'bool':
header.h:3:1: error: syntax error before 'util_func'
 bool util_func(int a)
PARSING ERROR

This might be due to GCC 15 now defaulting to -std=gnu23, whereas GCC 14 defaulted to -std=gnu17, and:
* C23 is stricter about function prototypes than C17
* there are various new keywords in C23, including "bool"





Reproducible: Always

Comment 1 Aoife Moloney 2025-02-26 13:21:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 2 Lukáš Zaoral 2025-04-23 08:13:54 UTC
This should be resolved by the following upstream PRs:
* https://github.com/diffblue/cbmc/pull/8620
* https://github.com/diffblue/cbmc/pull/8623

Comment 3 Lukáš Zaoral 2025-04-23 08:14:46 UTC
*** Bug 2339958 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.