Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#286 Internal compiler error in rest_of_compilation, at toplev.c

closed-fixed
Danny Smith
gcc (462)
2003-09-12
2003-02-18
Oley Yurchenko
No

sh-2.04$ gcc preproc1.cpp -I../include
-I../include/interpret
preproc1.cpp: In function `TOperandType
GetOperandType(TString)':
preproc1.cpp:1392: Internal compiler error in
rest_of_compilation, at toplev.c:
3498
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.
sh-2.04$ gcc -E preproc1.cpp -I../include
-I../include/interpret > preproc-E.cpp
sh-2.04$ gzip preproc-E.cpp

Discussion

  • Oley Yurchenko
    Oley Yurchenko
    2003-02-18

    preprocessed source

     
    Attachments
  • Oley Yurchenko
    Oley Yurchenko
    2003-02-18

    Logged In: YES
    user_id=714986

    sh-2.04$ gcc -v
    Reading specs from
    e:/MinGW/bin/../lib/gcc-lib/mingw32/3.2.2/specs
    Configured with: ../gcc/configure --with-gcc --with-gnu-ld
    --with-gnu-as --host=mingw32 --target=mingw32
    --prefix=/mingw --enable-threads --disable-nls
    --enable-languages=c++,f77,objc --disable-win32-registry
    --disable-shared --enable-sjlj-exceptions
    Thread model: win32
    gcc version 3.2.2 (mingw special 20030208-1)

     
  • Danny Smith
    Danny Smith
    2003-02-18

    Logged In: YES
    user_id=11494

    This bug has been reported to gcc GNATS database at
    least 6 times. Have a look.

    You declare :
    TOperandType __attribute__((dllimport)) GetOperandType
    (TString src);
    (line 40921 in preprocessed file)

    Then you use this function (line 41163 in preprocessed
    file and later)

    The you define it at line 41425.

    The same thing happens with other functions.

    I think you've gotten some macros mixed up.
    You shouldn't be declaring as dllimport if you want to
    define and export functions.

    Here is a reduced test case:

    ====================================

    /* dllimport.C */
    /* Declare as import from dll */
    extern __attribute__((dllimport)) void foo(void);

    /* Use it */
    int bar(void)
    {
    foo();
    }

    /* Define it.
    The definition should override the dllimport attribute
    */
    void foo (void){}

    /* end dllimport.C */

    ====================================

    G++ -c dllimport.C
    D:\develop\bugs>G++ -c dllimport.C
    dllimport.C: In function `void foo()':
    dllimport.C:11: internal compiler error: in
    rest_of_compilation, at
    toplev.c:
    3571
    Please submit a full bug report,

    The ICE part is perhaps a regression. GCC 2.95 used to
    just output faulty code (silently)

    Anyway. I'll close this as it is a duplicate of known
    bugs reported to GCC lists.

     
  • Danny Smith
    Danny Smith
    2003-02-18

    • status: open --> pending
     
  • Danny Smith
    Danny Smith
    2003-03-20

    Logged In: YES
    user_id=11494

    I shouldn't have pending'd this. It makes it hard to find
    for other people.

     
  • Danny Smith
    Danny Smith
    2003-03-20

    • status: pending --> open
     
  • Danny Smith
    Danny Smith
    2003-09-12

    • status: open --> closed-fixed
     
  • Danny Smith
    Danny Smith
    2003-09-12

    Logged In: YES
    user_id=11494

    Fixed in mingw release of gcc-3.2.3 (you may not like the fix,
    but at least gcc now tells you about the ambiguity).

    Danny