This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/66258] New: compiling a stdarg function with arch +nofp generates an ICE
- From: "wilson at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 22 May 2015 17:41:00 +0000
- Subject: [Bug target/66258] New: compiling a stdarg function with arch +nofp generates an ICE
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66258
Bug ID: 66258
Summary: compiling a stdarg function with arch +nofp generates
an ICE
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: wilson at gcc dot gnu.org
Target Milestone: ---
palantir:2187$ more tmp.c
#include <stdarg.h>
int
sub (int num, ...)
{
va_list ap;
int j;
va_start (ap, num);
j = va_arg (ap, int);
va_end (ap);
return j;
}
palantir:2188$ ./xgcc -B./ -O -S tmp.c -mcpu=cortex-a53+nofp
tmp.c: In function âsubâ:
tmp.c:14:1: error: unrecognizable insn:
}
^
(insn 86 9 87 2 (set (reg:DI 0 x0 [101])
(truncate:DI (reg:TI 32 v0))) tmp.c:5 -1
(nil))
tmp.c:14:1: internal compiler error: in extract_insn, at recog.c:2329
0xa32b9a _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc-svn/gcc/rtl-error.c:110
0xa32bc9 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc-svn/gcc/rtl-error.c:118
0xa078e7 extract_insn(rtx_insn*)
../../gcc-svn/gcc/recog.c:2329
0xa07964 extract_insn_cached(rtx_insn*)
../../gcc-svn/gcc/recog.c:2220
0x79df7d cleanup_subreg_operands(rtx_insn*)
../../gcc-svn/gcc/final.c:3140
0xa05277 split_insn
../../gcc-svn/gcc/recog.c:2943
0xa09cc7 split_all_insns()
../../gcc-svn/gcc/recog.c:2997
0xa09d52 rest_of_handle_split_after_reload
../../gcc-svn/gcc/recog.c:3938
0xa09d52 execute
../../gcc-svn/gcc/recog.c:3967
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.
palantir:2189$
The problem is that all of the FP move patterns in the aarch64.md file use
TARGET_FLOAT, which checks both -mgeneral-regs-only and architecture fp
support. However, the stdarg code is only checking TARGET_GENERAL_REGS_ONLY.
It needs to use TARGET_FLOAT instead. There is the same problem in the
secondary reloads code and in the function value regno code.
Patch to be submitted shortly.