[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 --- Comment #11 from Eric Botcazou --- Author: ebotcazou Date: Tue Mar 1 00:22:26 2016 New Revision: 233833 URL: https://gcc.gnu.org/viewcvs?rev=233833=gcc=rev Log: PR target/69706 * config/sparc/sparc.c (NWORDS_UP): Rename to... (CEIL_NWORDS): ...this. Use CEIL macro. (compute_fp_layout): Adjust to above renaming. (function_arg_union_value): Likewise. (sparc_arg_partial_bytes): Likewise. (sparc_function_arg_advance): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/config/sparc/sparc.c
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 Eric Botcazou changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED Target Milestone|--- |6.0 --- Comment #10 from Eric Botcazou --- This will be fixed in the upcoming GCC 6.0 release. No backport planned since this has never worked and the fix contains an ABI change.
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 --- Comment #9 from Eric Botcazou --- Author: ebotcazou Date: Mon Feb 29 10:20:31 2016 New Revision: 233808 URL: https://gcc.gnu.org/viewcvs?rev=233808=gcc=rev Log: PR target/69706 * config/sparc/sparc.c (ROUND_ADVANCE): Rename to... (NWORDS_UP): ...this (init_cumulative_args): Minor tweaks. (sparc_promote_function_mode): Likewise. (scan_record_type): Delete. (traverse_record_type): New function template. (classify_data_t): New structure type. (classify_registers): New inline function. (function_arg_slotno): In 64-bit mode, bail out early if FP slots are exhausted. Instantiate traverse_record_type on classify_registers and deal with the case of a structure passed in slot #15 with no FP field in the first word. (assign_data_t): New structure type. (compute_int_layout): New static function. (compute_fp_layout): Likewise. (count_registers): New inline function. (assign_int_registers): New static function. (assign_fp_registers): Likewise. (assign_registers): New inline function. (function_arg_record_value_1): Delete. (function_arg_record_value_2): Likewise. (function_arg_record_value_3): Likewise. (function_arg_record_value): Adjust to above changes. Instantiate traverse_record_type on count_registers to first count the number of registers to be used and then on assign_registers to assign them. (function_arg_union_value): Adjust to above renaming. (sparc_function_arg_1); Minor tweaks. Remove commented out code. (sparc_arg_partial_bytes): Adjust to above renaming. Deal with the case of a structure passed in slot #15 (sparc_function_arg_advance): Likewise. (function_arg_padding): Minor tweak. Added: trunk/gcc/testsuite/gcc.target/sparc/20160229-1.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/sparc/sparc.c trunk/gcc/testsuite/ChangeLog
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 --- Comment #8 from Eric Botcazou --- > I'm leaning towards fixing both the ICE and the ABI bug. OK, let's do that for GCC 6 then and document it, thanks.
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 --- Comment #7 from davem at gcc dot gnu.org --- I'm leaning towards fixing both the ICE and the ABI bug.
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 Eric Botcazou changed: What|Removed |Added CC||davem at gcc dot gnu.org, ||rth at gcc dot gnu.org --- Comment #6 from Eric Botcazou --- SPARC maintainers, any preference?
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 --- Comment #5 from Eric Botcazou --- It's a bug in the original implementation of the SPARC 64-bit calling conventions dating back to 1998: /* There's no need to check this_slotno < SPARC_FP_ARG_MAX. If it wasn't true we wouldn't be here. */ That's wrong for a 12- or 16-byte FP structure passed in slot #15, which must be passed half in %d30 and half on the stack according to SCD 2.4.1. What's annoying is that, while for a 12-byte structure this results in an ICE as in the case at hand, for a 16-byte structure containing doubles this results in wrong code, in the form of a violation of the SPARC 64-bit calling conventions (the second half of the structure is passed in %d32 instead of on the stack). So we are faced with the following alternative: 1. Fix only the ICE and don't change GCC's ABI, IOW keep the ABI bug, 2. Fix the ICE and the ABI bug, IOW change GCC's ABI.
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 --- Comment #4 from Eric Botcazou --- Reduced testcase: typedef struct { float r, g, b; } t_rgb; void write_xpm(void *out, unsigned int flags, const char *title, const char *legend, const char *label_x, const char *label_y, int n_x, int n_y, float axis_x[], float axis_y[], float *mat[], float lo, float hi, t_rgb rlo, t_rgb rhi) {} pr69706.C: In function 'void write_xpm(void*, unsigned int, const char*, const char*, const char*, const char*, int, int, float*, float*, float**, float, float, t_rgb, t_rgb)': pr69706.C:7:2: error: insn does not satisfy its constraints: {} ^ (insn 19 18 4 (set (reg:SF 40 %f8 [115]) (reg:SF 64 %f32 [ rhi+8 ])) pr69706.C:7 97 {*movsf_insn} (nil)) pr69706.C:7:2: internal compiler error: in final_scan_insn, at final.c:2921
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-02-08 Ever confirmed|0 |1
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 Eric Botcazou changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org --- Comment #2 from Eric Botcazou --- I have a similar ICE at -O0: /build/gromacs-FIH5VT/gromacs-5.1.1/src/gromacs/fileio/matio.cpp: In function 'void write_xpm(FILE*, unsigned int, const char*, const char*, const char*, const char*, int, int, real*, real*, real**, real, real, t_rgb, t_rgb, int*)': /build/gromacs-FIH5VT/gromacs-5.1.1/src/gromacs/fileio/matio.cpp:1189:1: error: insn does not satisfy its constraints: (insn 19 18 4 (set (reg:SF 40 %f8 [122]) (reg:SF 64 %f32 [ rhi+8 ])) /build/gromacs-FIH5VT/gromacs-5.1.1/src/gromacs/fileio/matio.cpp:1162 97 {*movsf_insn} (nil)) /build/gromacs-FIH5VT/gromacs-5.1.1/src/gromacs/fileio/matio.cpp:1189:1: internal compiler error: in final_scan_insn, at final.c:2921
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 Eric Botcazou changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org --- Comment #3 from Eric Botcazou --- Investigating.
[Bug target/69706] internal compiler error: in extract_constrain_insn, at recog.c:2246
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69706 Mikael Pettersson changed: What|Removed |Added CC||mikpelinux at gmail dot com --- Comment #1 from Mikael Pettersson --- I can reproduce the ICE with -std=c++11 -m64 -O2 and g++ 5.3 or 6.0 (r233023) on sparc64-linux. g++ 4.9 can't compile this preprocessed code.