Created attachment 576668 [details] clang build log I get a gcc internal segmentation fault: /var/tmp/portage/sys-devel/clang-7.1.0/work/x/y/cfe-7.1.0.src/lib/CodeGen/CGDebugInfo.cpp:486:40: note: ‘CSKind’ was declared here Optional<llvm::DIFile::ChecksumKind> CSKind; ^~~~~~ /var/tmp/portage/sys-devel/clang-7.1.0/work/x/y/cfe-7.1.0.src/lib/CodeGen/CGDebugInfo.cpp: In member function ‘llvm::DIType* clang::CodeGen::CGDebugInfo::CreateType(const clang::BuiltinType*)’: /var/tmp/portage/sys-devel/clang-7.1.0/work/x/y/cfe-7.1.0.src/lib/CodeGen/CGDebugInfo.cpp:586:25: warning: ‘Encoding’ may be used uninitialized in this function [-Wmaybe-uninitialized] llvm::dwarf::TypeKind Encoding; ^~~~~~~~ during RTL pass: gcse2 In file included from /usr/lib64/llvm/7/include/llvm/PassRegistry.h:20, from /usr/lib64/llvm/7/include/llvm/PassSupport.h:26, from /usr/lib64/llvm/7/include/llvm/Pass.h:376, from /usr/lib64/llvm/7/include/llvm/IR/DataLayout.h:29, from /var/tmp/portage/sys-devel/clang-7.1.0/work/x/y/cfe-7.1.0.src/lib/CodeGen/CGBuilder.h:13, from /var/tmp/portage/sys-devel/clang-7.1.0/work/x/y/cfe-7.1.0.src/lib/CodeGen/CGDebugInfo.h:17, from /var/tmp/portage/sys-devel/clang-7.1.0/work/x/y/cfe-7.1.0.src/lib/CodeGen/CGDebugInfo.cpp:14: /usr/lib64/llvm/7/include/llvm/ADT/DenseMap.h: In member function ‘void llvm::DenseMap<KeyT, ValueT, KeyInfoT, BucketT>::grow(unsigned int) [with KeyT = const clang::FunctionDecl*; ValueT = llvm::TrackingMDRef; KeyInfoT = llvm::DenseMapInfo<const clang::FunctionDecl*>; BucketT = llvm::detail::DenseMapPair<const clang::FunctionDecl*, llvm::TrackingMDRef>]’: /usr/lib64/llvm/7/include/llvm/ADT/DenseMap.h:743:3: internal compiler error: Segmentation fault } ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.gentoo.org/> for instructions. ------ emerge --info '=sys-devel/clang-7.1.0::gentoo' Portage 2.3.62 (python 3.6.5-final-0, default/linux/amd64/17.0, gcc-8.3.0, glibc-2.29-r2, 5.0.1-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.0.1-gentoo-x86_64-AMD_Ryzen_7_2700X_Eight-Core_Processor-with-gentoo-2.6 KiB Mem: 32801388 total, 9213488 free KiB Swap: 64804856 total, 50978552 free Timestamp of repository gentoo: Tue, 14 May 2019 14:30:01 +0000 Head commit of repository gentoo: 00d9d65de03f84e0e46cba9272d55f060bc8951e sh bash 4.4_p23-r1 ld GNU ld (Gentoo 2.30 p5) 2.30.0 app-shells/bash: 4.4_p23-r1::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.26.2::gentoo dev-lang/python: 2.7.15::gentoo, 3.5.5::gentoo, 3.6.5::gentoo dev-util/cmake: 3.9.6::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.41.2::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.30-r4::gentoo, 2.31.1-r6::gentoo sys-devel/gcc: 7.3.0-r3::gentoo, 8.2.0-r6::gentoo, 8.3.0-r1::gentoo sys-devel/gcc-config: 2.0::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.29-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes penguindreams-org location: /usr/local/portage masters: gentoo priority: 0 4nykey location: /var/lib/layman/4nykey masters: gentoo priority: 50 andy location: /var/lib/layman/andy masters: gentoo priority: 50 flatpak-overlay location: /var/lib/layman/flatpak-overlay masters: gentoo priority: 50 gentoo-scala-tools location: /var/lib/layman/gentoo-scala-tools masters: gentoo priority: 50 hamper-overlay location: /var/lib/layman/hamper-overlay masters: gentoo priority: 50 java location: /var/lib/layman/java masters: gentoo priority: 50 jorgicio location: /var/lib/layman/jorgicio masters: gentoo priority: 50 mrueg location: /var/lib/layman/mrueg masters: gentoo priority: 50 obs-studio-overlay location: /var/lib/layman/obs-studio-overlay masters: gentoo priority: 50 reagentoo location: /var/lib/layman/reagentoo masters: gentoo priority: 50 sabayon location: /var/lib/layman/sabayon masters: gentoo priority: 50 steam-overlay location: /var/lib/layman/steam-overlay masters: gentoo priority: 50 sublime-text location: /var/lib/layman/sublime-text masters: gentoo priority: 50 tlp location: /var/lib/layman/tlp masters: gentoo priority: 50 tmacedo location: /var/lib/layman/tmacedo masters: gentoo priority: 50 vampire location: /var/lib/layman/vampire masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA Sublime PUEL dotnet-eula" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O3 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /usr/share/maven-bin-3.6/conf" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O3 -pipe -march=native" DISTDIR="/usr/portage/distfiles" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en" MAKEOPTS="-j12" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac aalib acl acpi aim alsa amd64 aspell audiofile avahi berkdb bluetooth browserplugin bzip2 cairo cdinstall cdparanoia cdr cleartype cli consolekit corefonts crypt cups cxx dbus dmenu dri dts dvd dvdr dvdread emacs emul-linux-x86 exif fam ffmpeg firefox fish-completion flac fortran ftp gdbm gif glamor gpm gstreamer gtk2 gtkhtml gudev hal hwdb iconv ipv6 java jpeg ldap libcaca libtirpc log4j mad matroska mmx mono mp3 mp4 mpd mpeg msn multilib mysql ncurses nls nptl nptlonly offensive ogg oggvorbis opengl openmp pam pcre pdf png pulseaudio quicktime readline real rtc samba sdl seamonkey seccomp spell sse sse2 ssl svg tcpd theora tiff tracker truetype type1 unicode usb v4l vaapi vcd vorbis webp win32codecs wmf xattr xinerama xmms xscreensaver xvid yahoo zlib" ABI_X86="32 64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir uusertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="synaptics evdev" KERNEL="linux" L10N="en en-US en_US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi headers_more" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
You shouldn't be building with -O3 globally. Please try again with -O2.
(In reply to Ben Kohler from comment #1) > You shouldn't be building with -O3 globally. Please try again with -O2. I agree -O3 is fragile. At the same time toolchain@ is interested in gcc not to ICE on -O3 :) If it's reproducible and looks deterministic (enough RAM and disk space) I suggest extracting self-contained example: https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide