https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85030
Bug ID: 85030 Summary: internal compiler error: Floating point exception (validate_subreg()) Product: gcc Version: 8.0.1 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: inline-asm Assignee: unassigned at gcc dot gnu.org Reporter: vegard.nossum at oracle dot com Target Milestone: --- Input: void d() { struct f { int c; int *b; int *e; } a; asm("" : "=rm" (a) : "0" (1)); } Output: $ cc1plus void d() Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> <visibility> <build_ssa_passes> <opt_local_passes> <targetclone> <free-fnsummary> <whole-program> <fnsummary> <inline> <free-fnsummary> <single-use> <comdats>Assembling functions: <materialize-all-clones> <simdclone> void d()during RTL pass: reload <stdin>: In function 'void d()': <stdin>:9:1: internal compiler error: Floating point exception 0x3152ce9 crash_signal /home/vegard/git/gcc/gcc/toplev.c:325 0x1d80f52 validate_subreg(machine_mode, machine_mode, rtx_def const*, poly_int<1u, unsigned long>) /home/vegard/git/gcc/gcc/emit-rtl.c:910 0x1d81db6 gen_rtx_SUBREG(machine_mode, rtx_def*, poly_int<1u, unsigned long>) /home/vegard/git/gcc/gcc/emit-rtl.c:1010 0x1d81db6 gen_lowpart_SUBREG(machine_mode, rtx_def*) /home/vegard/git/gcc/gcc/emit-rtl.c:1026 0x287cde5 match_reload /home/vegard/git/gcc/gcc/lra-constraints.c:945 0x28ade79 curr_insn_transform /home/vegard/git/gcc/gcc/lra-constraints.c:4335 0x28b93b6 lra_constraints(bool) /home/vegard/git/gcc/gcc/lra-constraints.c:4877 0x2829984 lra(_IO_FILE*) /home/vegard/git/gcc/gcc/lra.c:2419 0x2608794 do_reload /home/vegard/git/gcc/gcc/ira.c:5465 0x2608794 execute /home/vegard/git/gcc/gcc/ira.c:5649 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Version: GNU C++14 (GCC) version 8.0.1 20180306 (experimental) (x86_64-pc-linux-gnu) Looks similar to bug #49522, but that's OLD (and fixed). It starts failing between 4.7.4 and 4.8.1. Not C++-specific, cc1 crashes with the same test case. Clang also seems to segfault on this one...