This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Internal compiler error -- unrecognizable insn.




    Hi all, 

  I'm new to this hacking gcc business, so please forgive me if I ask what
seem like dumb questions with obvious answers, but it will help me to know
whether I'm making wrong assumptions about the way gcc works.

  I'm modifying gcc 2.95.2 in two ways at the moment. I'm adding a flag
that alters the implementation of the EABI calling conventions and varargs
to be backwardly compatible with the egcs 2.7.2 implementation, for the
sake of compatibility with VxWorks .o files produced by WRS' version of
2.7.2, and I'm also porting their implementation of longcall/shortcall
handling unconditionally, as it's more advanced than the current longcall
attribute-only implementation. 

  As a test, I'm building a huge application that I develop at work. Out
of 300 source files containing about half-a-million lines of code, I get
one file that fails to build with a compiler error:

ccppc -BF:\Tornado/host/x86-win32/lib/gcc-lib/  -mlongcall -memb 
-fsigned-char -Wconversion -Wmissing-prototypes -mstrict-align -ansi 
-nostdinc -DRW_MULTI_THREAD -D_REENTRANT   -O3   -fno-builtin -fno-for-scope
-I/h   -I. -IF:\Tornado\target\config\all -IF:\Tornado\target/h 
-IF:\Tornado\target/src/config -IF:\Tornado\target/src/drv -DCPU=PPC604 
-DD3 -DNEW_CPU -DRUN_ON_750 -mvxcompatible    -Wnested-externs 
-Wmissing-declarations -Wreturn-type -Wnested-externs -Wimplicit 
-Wstrict-prototypes -Wparentheses  -Wchar-subscripts  -DH050REVISION_B 
-mcpu=604 -c textline.cpp

textline.cpp: In function `void TextLineStyleChanged()':
textline.cpp:389: internal error--unrecognizable insn:
(call_insn/i 274 273 345 (parallel[
            (set (reg:SI 3 r3)
                 (call (mem:SI (symbol_ref:SI ("AddCharacterLine__FUi")) 0)
                    (const_int 0 [0x0])))
            (use (const_int 0 [0x0]))
            (clobber (scratch:SI))
        ] ) -1 (insn_list 273 (nil))
    (expr_list:REG_UNUSED (reg:SI 3 r3)
        (expr_list:REG_UNUSED (scratch:SI)
            (nil)))
    (expr_list (use (reg:SI 3 r3))
        (nil)))
make: *** [textline.o] Error 0x1

  Now, my first assumption would be that I've mangled rs6000.md by
spuriously
adding a test for longcall in the test-condition for one of the call insn
definitions, leading to the compiler being unable to match any pattern. That
would seem to me make sense because the function in the symbol_ref does
exist 
in the same file as above; therefore it should have been matched by a local
call insn pattern; therefore the fact that it isn't must mean I've broken
one (I *was* trying to leave the local call insns alone, honest!) On the
other hand, the error doesn't show itself if I use optimizer level -O2.

  So what I hope someone can tell me is 
      1) Is my analysis above correct? 
and   2) Why should the optimizer make the difference here?

  I also have two subsidiary questions:
      3) Are there any known problems with the optimizer in the ppc build
         of 2.95.2 that might generate invalid code (in particular, illegal
         memory refernces, but I'd be interested to know about any verified
         bugs in the optimizer)
      4) How can you use the testsuite with a non-self-hosted port?

  If anyone is kind enough to lend a hand to a newbie, I'd be very 
grateful!

       DaveK
-- 
The Boulder Pledge: "Under no circumstances will I ever purchase anything 
offered to me as the result of an unsolicited email message. Nor will I 
forward chain letters, petitions, mass mailings, or virus warnings to large 
numbers of others. This is my contribution to the survival of the online
community."


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]