gcc-14 bugs, pile 3

November 22, 2023

This week GCC 14 entered stage 3. Most major features are already pushed to master branch and the main focus now is to stabilize the result.

It’s a good time to look at bugs I noticed over past two months. This time I saw 19 of those. That almost twice as much than over previous 2 months.


Bugs (or patches) in the order I observed them:

fun discovery

I found a few new things as part of poking at those bugs:

IFNDR “Ill-Formed, No Diagnostic Required” is the known invalid code from type checking standpoint that is allowed to be compiled. In this case the whole program has an undefined behaviour.

-Walloc-size added in PR71219 detects interesting cases of T * p = malloc(sz) calls when it’s clear that sz is smaller than sizeof(T). It also works on calloc() and already found a few benign instances in elfutils, waypipe, sway and swaybg.


Looking at the bug categories:

This cycle was very unusual: it has more bugs than I expected, it spans over 12 categories of compiler components, most of bugs are in i386 target.

parting words

This cycle felt very busy: about 2-3 bugs per week.

I had a lot of joy fixing PGO bootstrap and submitting a few trivial fixes upstream.

I encountered only two bugs related to wrong code generated by gcc. Most of the bugs were compiler crashes which are a lot easier to detect, report and fix. Chances are I did not get to running enough test suites as there were so many obvious bugs that required some attention.

Let’s see what stage 3 will bring us.

Have fun!