Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938352 - sys-devel/gcc: error: reference to dead statement
Summary: sys-devel/gcc: error: reference to dead statement
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-23 17:44 UTC by look
Modified: 2024-12-11 08:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The build environment (environment,170.56 KB, text/plain)
2024-08-23 17:45 UTC, look
Details
The elibtool log (elibtool.log,11.56 KB, text/x-log)
2024-08-23 17:45 UTC, look
Details
The build log (build.log.gz,427.26 KB, application/gzip)
2024-08-23 17:46 UTC, look
Details
emerge --info output (emerge-info-output.txt,22.53 KB, text/plain)
2024-08-23 18:06 UTC, look
Details

Note You need to log in before you can comment on or make changes to this bug.
Description look 2024-08-23 17:44:44 UTC
Hello. I cannot build GCC13:
In file included from /var/tmp/portage/sys-devel/gcc-13.3.1_p20240614/work/gcc-13-20240614/gcc/c-family/c-common.cc:9555:
./gt-c-family-c-common.h: In function ‘void c_define_builtins(tree, tree)’:
./gt-c-family-c-common.h:199:2: error: reference to dead statement
  199 | };
      |  ^
./gt-c-family-c-common.h:199: confused by earlier errors, bailing out

For some reason, I cannot compile any version of GCC even when I install the GCC & binutils binaries and use them to compile GCC13. This particular compilation is with the GCC14 I currently have installed.
Comment 1 look 2024-08-23 17:45:05 UTC
Created attachment 901017 [details]
The build environment
Comment 2 look 2024-08-23 17:45:24 UTC
Created attachment 901018 [details]
The elibtool log
Comment 3 look 2024-08-23 17:46:57 UTC
Created attachment 901019 [details]
The build log
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-23 18:01:35 UTC
The cfg is corrupt:
```
            for (i = 0; iterate_reference (i, ref); i++)
              if (ref->stmt && !stmts.contains (ref->stmt))
                {
                  error ("reference to dead statement");
                  cgraph_debug_gimple_stmt (this_cfun, ref->stmt);
                  error_found = true;
                }
```

Please include emerge --info. I suspect your machine has something like a broken gmp or mpc library.
Comment 5 look 2024-08-23 18:06:59 UTC
Created attachment 901020 [details]
emerge --info output

Okay. Here is the emerge --info output.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-23 18:15:26 UTC
> CFLAGS="-march=native -O3 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -ggdb3 -pipe -fno-math-errno -fno-trapping-math -flto=auto -fuse-linker-plugin -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition"


If you've been building chunks of your system with -fno-math-errno -fno-trapping-math, it might well be related. Don't do that.