Bug 55103 - [4.8 Regression] All MIPS16 attribute tests ICEs
Summary: [4.8 Regression] All MIPS16 attribute tests ICEs
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2012-10-28 09:20 UTC by Andrew Pinski
Modified: 2012-11-01 23:17 UTC (History)
1 user (show)

See Also:
Host:
Target: mips*-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-11-01 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2012-10-28 09:20:45 UTC
./cc1 /home/apinski/src/gcc-fsf/local/gcc/gcc/testsuite/gcc.target/mips/int-moves-2.c -quiet -DNOMIPS16= "-DMIPS16=__attribute__((mips16))" -mgp64 -mabi=o64
/home/apinski/src/gcc-fsf/local/gcc/gcc/testsuite/gcc.target/mips/int-moves-2.c:27:1: internal compiler error: Bus error
 {
 ^
0x105164f7 crash_signal
        /home/apinski/src/gcc-fsf/local/gcc/gcc/toplev.c:333
0x103f9191 init_op_alt_data
        /home/apinski/src/gcc-fsf/local/gcc/gcc/lra.c:575
0x103f9191 lra_init()
        /home/apinski/src/gcc-fsf/local/gcc/gcc/lra.c:2389
0x1051639b lang_dependent_init_target
        /home/apinski/src/gcc-fsf/local/gcc/gcc/toplev.c:1673
0x108aa893 save_target_globals()
        /home/apinski/src/gcc-fsf/local/gcc/gcc/target-globals.c:89
0x10776987 mips_set_mips16_mode
        /home/apinski/src/gcc-fsf/local/gcc/gcc/config/mips/mips.c:16350
0x100bec4b store_parm_decls()
        /home/apinski/src/gcc-fsf/local/gcc/gcc/c/c-decl.c:8306
0x10109557 c_parser_declaration_or_fndef
        /home/apinski/src/gcc-fsf/local/gcc/gcc/c/c-parser.c:1755
0x1010e1c3 c_parser_translation_unit
        /home/apinski/src/gcc-fsf/local/gcc/gcc/c/c-parser.c:1251
0x1010e1c3 c_parse_file()
        /home/apinski/src/gcc-fsf/local/gcc/gcc/c/c-parser.c:10889
0x1015356f c_common_parse_file()
        /home/apinski/src/gcc-fsf/local/gcc/gcc/c-family/c-opts.c:1062
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.
Comment 1 Andrew Pinski 2012-10-28 09:32:06 UTC
This is because save_target_globals does not allocate a target_lra_int (though it might be zero out the array before doing anything else too).
Comment 2 Andrew Pinski 2012-10-28 09:49:42 UTC
It is not just int-moves-2.c but all of the tests of the mips16 attribute.
Comment 3 Steve Ellcey 2012-11-01 19:53:01 UTC
I am seeing this failure as well when building newlib with the -mips16 option.

Here is a cut down test case (1 line) that gives me the same segfault as
Andrew is seeing.


argz_add(char **argz , long unsigned int *argz_len , const char *str)
Comment 4 Steve Ellcey 2012-11-01 23:17:48 UTC
I have checked in a patch for this problem as an obvious fix.

http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00153.html

I forgot to put the bug number in ChangeLog, that is why bugzilla
did not get updated automatically.