PATCH: mips16 function attributes, version N+1

David Daney ddaney@avtrex.com
Fri Sep 7 15:44:00 GMT 2007


Sandra Loosemore wrote:
> David Daney wrote:
>> Sandra Loosemore wrote:
>>> Richard Sandiford wrote:
>>>
>>>> Unfortunately, I think removing the code _will_ need a retest.  OK 
>>>> with
>>>> that change on top of the other ones.
>>>
>>> OK, fixed up as suggested, retested, and committed now.  For the 
>>> record, I'm attaching the final version of the patch as committed.
>>>
>>> -Sandra
>>>
>>
>> How was this tested?
>
> For testing the MIPS part, I was using a mipsisa32r2-elfoabi 
> configuration, built on i686-pc-linux-gnu.  I ran the gcc and g++ 
> testsuites with the following combinations of options:
>
>   default
>   -mfp64
>   -msoft-float
>   -EL
>   -EL -mfp64
>   -EL -msoft-float
>   -mips16
>   -mips16 -mfp64
>   -mips16 -msoft-float
>   -mips16 -EL
>   -mips16 -EL -mfp64
>   -mips16 -EL -msoft-float
>
> For testing -mflip-mips16, I was using only the gcc testsuite, and ran 
> it with all the same combinations of other flags listed above.  I 
> investigated every test case that was failing with -mflip-mips16 that 
> wasn't already failing with one of the {-mips16, -mnomips16} base 
> configurations.
>
> I also did a full bootstrap and regression test on i686 and an ARM 
> build and test, to verify that the non-MIPS-specific support pieces 
> were doing sensible things on other targets.
>
>> It causes bootstrap failure due to an ICE building libstdc++ on 
>> mipsel-linux.
>>
>> See: http://gcc.gnu.org/ml/gcc/2007-09/msg00143.html
>
> Hrrmmm.  I'm not sure I can duplicate this build environment.
I did my regression hunt on a cross compiler.

If you would like, I could make some inquiries about making the 
mipsel-linux box available...

>   Any chance you could get me a backtrace from the point of the ICE so 
> I could take a quick look at where the error is happening?  Otherwise 
> I suppose I'll have to revert at least the MIPS-specific part of the 
> patch while we investigate.  :-(
FWIW:
#0  internal_error (gmsgid=0xfee130 "tree check: %s, have %s in %s, at 
%s:%d")
    at ../../clean/gcc/diagnostic.c:599
#1  0x0000000000ccc9ec in tree_check_failed (node=0x2aaab068d200,
    file=0xfeb7c4 "../../clean/gcc/tree.c", line=4980,
    function=0xfed770 "tree_int_cst_sgn") at ../../clean/gcc/tree.c:6805
#2  0x0000000000cbd47a in tree_int_cst_sgn (t=0x2aaab068d200)
    at ../../clean/gcc/tree.c:4980
#3  0x0000000000651b61 in write_integer_cst (cst=0x2aaab068d200)
    at ../../clean/gcc/cp/mangle.c:1229
#4  0x0000000000651a32 in write_template_arg_literal (value=0x2aaab0685e60)
    at ../../clean/gcc/cp/mangle.c:2288
#5  0x000000000065280a in write_template_arg (node=0x2aaab0685e60)
    at ../../clean/gcc/cp/mangle.c:2363
#6  0x000000000064f33a in write_template_args (args=0x2aaab068d4c0)
    at ../../clean/gcc/cp/mangle.c:2033
#7  0x00000000006499c1 in write_prefix (node=0x2aaab068e270)
    at ../../clean/gcc/cp/mangle.c:999
#8  0x0000000000648f75 in write_nested_name (decl=0x2aaab068e4e0)
    at ../../clean/gcc/cp/mangle.c:938
#9  0x000000000064d072 in write_type (type=0x2aaab068e410)
    at ../../clean/gcc/cp/mangle.c:1639
#10 0x000000000064ef64 in write_method_parms (parm_types=0x2aaab069f840,
    method_p=1, decl=0x2aaab06a3000) at ../../clean/gcc/cp/mangle.c:1992
#11 0x000000000064ec15 in write_bare_function_type (type=0x2aaab06a1750,
    include_return_type_p=0, decl=0x2aaab06a3000)
    at ../../clean/gcc/cp/mangle.c:1933
#12 0x0000000000648021 in write_encoding (decl=0x2aaab06a3000)
    at ../../clean/gcc/cp/mangle.c:761
#13 0x00000000006475cc in write_mangled_name (decl=0x2aaab06a3000,
    top_level=1 '\001') at ../../clean/gcc/cp/mangle.c:708
#14 0x00000000006539d7 in mangle_decl_string (decl=0x2aaab06a3000)
    at ../../clean/gcc/cp/mangle.c:2624
#15 0x0000000000653dcb in mangle_decl (decl=0x2aaab06a3000)
    at ../../clean/gcc/cp/mangle.c:2648
#16 0x0000000000c952e8 in decl_assembler_name (decl=0x2aaab06a3000)
    at ../../clean/gcc/tree.c:304
#17 0x0000000000cec551 in make_decl_rtl (decl=0x2aaab06a3000)
    at ../../clean/gcc/varasm.c:1305
---Type <return> to continue, or q <return> to quit---
#18 0x0000000000d115ef in mips_set_current_function (fndecl=0x2aaab06a3000)
    at ../../clean/gcc/config/mips/mips.c:5307
#19 0x0000000000923b97 in invoke_set_current_function_hook (
    fndecl=0x2aaab06a3000) at ../../clean/gcc/function.c:3797
#20 0x00000000009242a9 in allocate_struct_function (fndecl=0x2aaab06a3000)
    at ../../clean/gcc/function.c:3902
#21 0x000000000046ba0c in start_preparsed_function (decl1=0x2aaab06a3000,
    attrs=0x0, flags=0) at ../../clean/gcc/cp/decl.c:11069
#22 0x000000000046d194 in start_function (declspecs=0x7fff1a021bf0,
    declarator=0x14634a0, attrs=0x0) at ../../clean/gcc/cp/decl.c:11247
#23 0x00000000005833b0 in 
cp_parser_function_definition_from_specifiers_and_declarator 
(parser=0x2aaaae0d3e10, decl_specifiers=0x7fff1a021bf0, attributes=0x0,
    declarator=0x14634a0) at ../../clean/gcc/cp/parser.c:16570
#24 0x000000000057acbc in cp_parser_init_declarator (parser=0x2aaaae0d3e10,
    decl_specifiers=0x7fff1a021bf0, checks=0x0,
    function_definition_allowed_p=1 '\001', member_p=0 '\0',
    declares_class_or_enum=0, function_definition_p=0x7fff1a021bef "\001")
    at ../../clean/gcc/cp/parser.c:12047
#25 0x0000000000583dcd in cp_parser_single_declaration 
(parser=0x2aaaae0d3e10,
    checks=0x0, member_p=0 '\0', explicit_specialization_p=0 '\0',
    friend_p=0x7fff1a021c9f "") at ../../clean/gcc/cp/parser.c:16906
#26 0x0000000000583758 in cp_parser_template_declaration_after_export (
    parser=0x2aaaae0d3e10, member_p=0 '\0')
    at ../../clean/gcc/cp/parser.c:16762
#27 0x0000000000576cdc in cp_parser_template_declaration (
    parser=0x2aaaae0d3e10, member_p=0 '\0') at 
../../clean/gcc/cp/parser.c:9190
#28 0x00000000005751a2 in cp_parser_declaration (parser=0x2aaaae0d3e10)
    at ../../clean/gcc/cp/parser.c:7660
#29 0x0000000000574f2e in cp_parser_declaration_seq_opt 
(parser=0x2aaaae0d3e10)
    at ../../clean/gcc/cp/parser.c:7591
#30 0x000000000057a281 in cp_parser_namespace_body (parser=0x2aaaae0d3e10)
    at ../../clean/gcc/cp/parser.c:11515
#31 0x000000000057a252 in cp_parser_namespace_definition (
    parser=0x2aaaae0d3e10) at ../../clean/gcc/cp/parser.c:11500
#32 0x000000000057526a in cp_parser_declaration (parser=0x2aaaae0d3e10)
    at ../../clean/gcc/cp/parser.c:7688
#33 0x0000000000574f2e in cp_parser_declaration_seq_opt 
(parser=0x2aaaae0d3e10)
    at ../../clean/gcc/cp/parser.c:7591
---Type <return> to continue, or q <return> to quit---
#34 0x000000000057a281 in cp_parser_namespace_body (parser=0x2aaaae0d3e10)
    at ../../clean/gcc/cp/parser.c:11515
#35 0x000000000057a252 in cp_parser_namespace_definition (
    parser=0x2aaaae0d3e10) at ../../clean/gcc/cp/parser.c:11500
#36 0x000000000057526a in cp_parser_declaration (parser=0x2aaaae0d3e10)
    at ../../clean/gcc/cp/parser.c:7688
#37 0x0000000000574f2e in cp_parser_declaration_seq_opt 
(parser=0x2aaaae0d3e10)
    at ../../clean/gcc/cp/parser.c:7591
#38 0x000000000056e1c7 in cp_parser_translation_unit (parser=0x2aaaae0d3e10)
    at ../../clean/gcc/cp/parser.c:2972
#39 0x000000000058b2dc in c_parse_file () at 
../../clean/gcc/cp/parser.c:20483
#40 0x00000000006ddbb5 in c_common_parse_file (set_yydebug=0)
    at ../../clean/gcc/c-opts.c:1280
#41 0x0000000000a9aeaa in compile_file () at ../../clean/gcc/toplev.c:1045
#42 0x0000000000a9cbf4 in do_compile () at ../../clean/gcc/toplev.c:2229
#43 0x0000000000a9cc58 in toplev_main (argc=37, argv=0x7fff1a022288)
    at ../../clean/gcc/toplev.c:2261
#44 0x00000000006fa2ff in main (argc=37, argv=0x7fff1a022288)
    at ../../clean/gcc/main.c:35
(gdb)




More information about the Gcc-patches mailing list