Summary: | [5 Regression] internal compiler error: in as_a, at is-a.h:192 | ||
---|---|---|---|
Product: | gcc | Reporter: | H.J. Lu <hjl.tools> |
Component: | bootstrap | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dmalcolm |
Priority: | P3 | ||
Version: | 5.0 | ||
Target Milestone: | 5.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2014-08-29 00:00:00 | |
Attachments: |
A testcase
Candidate fix, only lightly tested so far |
Description
H.J. Lu
2014-08-29 00:02:43 UTC
Created attachment 33413 [details] A testcase [x32@gnu-35 gcc]$ ./xgcc -B./ -S -fPIC -O2 /tmp/x.i -mx32 ../../../../src-trunk/libgcc/config/libbid/bid128_fma.c: In function ‘rounding_correction.constprop’: ../../../../src-trunk/libgcc/config/libbid/bid128_fma.c:33:1: internal compiler error: in as_a, at is-a.h:192 0x781642 rtx_insn* as_a<rtx_insn*, rtx_def>(rtx_def*) ../../src-trunk/gcc/is-a.h:192 0x90b93c assign_parm_setup_reg ../../src-trunk/gcc/function.c:3044 0x90d763 assign_parms ../../src-trunk/gcc/function.c:3453 0x9117cf expand_function_start(tree_node*) ../../src-trunk/gcc/function.c:4809 0x760cd9 execute ../../src-trunk/gcc/cfgexpand.c:5715 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. Created attachment 33414 [details]
Candidate fix, only lightly tested so far
Sorry about this. The issue is here: 3042 insn = as_a <rtx_insn *> ( 3043 gen_extend_insn (op0, t, promoted_nominal_mode, 3044 data->passed_mode, unsignedp)); which I mistakenly introduced in r214698. The result of the gen_extend_insn is a SET, not an insn: (set (reg/v:DI 151 [ ptrres ]) (zero_extend:DI (mem/f/c:SI (reg/f:SI 77 virtual-incoming-args) [8 ptrres+0 S4 A64]))) hence the as_a <rtx_insn *> fails. Am attaching a patch which appears to fix it. Author: dmalcolm Date: Fri Aug 29 03:12:01 2014 New Revision: 214714 URL: https://gcc.gnu.org/viewcvs?rev=214714&root=gcc&view=rev Log: PR bootstrap/62300 * function.c (assign_parm_setup_reg): Remove erroneous checked cast to rtx_insn * on result of gen_extend_insn in favor of introducing a new local rtx "pat". Modified: trunk/gcc/ChangeLog trunk/gcc/function.c Fixed. |