Bug 29384 - internal compiler error: in insn_default_length, at insn-attrtab.c:1134
Summary: internal compiler error: in insn_default_length, at insn-attrtab.c:1134
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.4
: P3 normal
Target Milestone: 4.0.4
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-08 09:52 UTC by kavon
Modified: 2006-10-10 04:57 UTC (History)
1 user (show)

See Also:
Host:
Target: mipsisa32-elf
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
the output of preprocessor (1.44 KB, text/plain)
2006-10-10 00:20 UTC, robert p
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kavon 2006-10-08 09:52:04 UTC
Hello,


I am currently using GCC compiler (3.4.4) on Mips target, with following options:

mipsisa32-elf-gcc -mips16 -msoft-float -EB -fdata-sections -fno-exceptions -MD
-g -G0 -I. -I... -Wall -Wpointer-arith -Winline
 -Wundef  -c  ... -c -o c:xxx.c



and during compilation process, the following error appears (I have checked previous bug on 
yhe same bug and I hope I will be luckier)

../../../../../app/mmi/common/mmiGenre.c: In function `mmiGenreInit':
../../../../../app/mmi/common/mmiGenre.c:92: error: unrecognizable insn:
(insn 14 13 15 ../../../../../app/mmi/common/mmiGenre.c:81 (set (reg/f:SI 2 $2 [182])
        (mem/u:SI (label_ref 0) [0 S4 A32])) -1 (nil)
    (expr_list:REG_EQUAL (symbol_ref:SI ("*isInit.0") [flags 0x2] <var_decl 0xe1c900 isInit>)
        (nil)))
../../../../../app/mmi/common/mmiGenre.c:92: internal compiler error: in insn_default_length, at insn-attrtab.c:1134
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.ecoscentric.com> for instructions.
make[3]: *** [../../../../bordeaux2/mojo2/Debug/app/mmi/common/mmiGenre.o] Error 1


Source code is the following one:

[Source]
#define MMI_GENRE_START(country, genreNum)
#define MMI_GENRE_END(country)
#define MMI_GENRE_TYPE(country, genreName, nibbleId) strId = eMMISTR_GENRE_##genreName; \
    countryRef = eGENRE_COUNTRY_INDEX_##country; \
    for(i = 0; i < MMI_GENRE_MAX_NUM; i++) \
    {\
        if(gMmiGenre[countryRef][i].name == 0) \
        {\
            gMmiGenre[countryRef][i].name = strId;\
            gMmiGenre[countryRef][i].nibble[0] = nibbleId;\
            break; \
        }\
        if(strId == gMmiGenre[countryRef][i].name) \
        { \
            uint32 j = 0; \
            while(j < MMI_GENRE_MAX_NUM) \
            {\
                if(gMmiGenre[countryRef][i].nibble[j] == 0)\
                {\
                    gMmiGenre[countryRef][i].nibble[j] = nibbleId;\
                    break;\
                }\
                j++;\
            }\
            break;\
        }\
    }\

void mmiGenreInit()
{
    static boolean isInit = FALSE;
    EMmiStringId strId;
    uint32 i = 0;
    ECountryId countryRef;
    if(!isInit)
    {
    #define GENRE_DEF

		#ifdef GENRE_DEF
		MMI_GENRE_START(UK, 8)
		MMI_GENRE_TYPE(UK, MOVIE, 0x01)
		MMI_GENRE_TYPE(UK, NEWS, 0x02)
		MMI_GENRE_TYPE(UK, NEWS, 0x07)
		MMI_GENRE_TYPE(UK, NEWS, 0x08)
		MMI_GENRE_TYPE(UK, ENTERTAINMENT, 0x03)
		MMI_GENRE_TYPE(UK, ENTERTAINMENT, 0x06)
		MMI_GENRE_TYPE(UK, SPORTS, 0x04)
		MMI_GENRE_TYPE(UK, CHILDRENS, 0x05)
		MMI_GENRE_TYPE(UK, EDUCATION, 0x09)
		MMI_GENRE_TYPE(UK, LIFESTYLE, 0x0A)
		MMI_GENRE_TYPE(UK, DRAMA, 0x0f)
		MMI_GENRE_END(UK)
		#endif

    #undef GENRE_DEF
    #undef MMI_GENRE_START
    #undef MMI_GENRE_END
    #undef MMI_GENRE_TYPE
    isInit = TRUE;
    }
}
Comment 1 Andrew Pinski 2006-10-08 21:23:38 UTC
Can you attach the preprocessed source?
Comment 2 robert p 2006-10-10 00:20:50 UTC
Created attachment 12400 [details]
the output of preprocessor

the bug appears with -mips16 compilation option; the compiler seams to be sensitive on the number of lines generated by the macro (the lines starting with strId = eMMISTR_GENRE_XXX); If I comment some of them the problem disapears. The number of lines the compiler behaves OK is 120.
Thanks
Comment 3 Andrew Pinski 2006-10-10 04:57:24 UTC
Works in 4.0.x and above so closing as fixed.