public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/55036] New: Compiler fails with message "internal compiler error: in reg_save_code, at caller-save.c:158"
@ 2012-10-23 14:25 jantlatlik at gmail dot com
  2013-05-10  6:21 ` [Bug target/55036] " segher at gcc dot gnu.org
  2014-01-11 10:13 ` ebotcazou at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: jantlatlik at gmail dot com @ 2012-10-23 14:25 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55036

             Bug #: 55036
           Summary: Compiler fails with message "internal compiler error:
                    in reg_save_code, at caller-save.c:158"
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jantlatlik@gmail.com


Assume the movm insn is the first define_insn pattern in the target md file:
When compiling with the built compiler at least with optimization level 2
(-O2), the compiler will always fail during compile when function calls are
involved.

The following error message occurs:
"internal compiler error: in reg_save_code, at caller-save.c:158"

A short web search lead me to this:
http://old.nabble.com/upgrading-gcc-4.4.0-to-gcc-4.7.0%3Aconfigure%3A-error%3A-cannot-compute-suffix-of-object-files%3A-cannot-compile-td34003613.html

Apparently he could fix it by putting any other define_insn (e.g. nop) right
before the mov insns, so the first mov insn does not get the index 0.
That worked for me as well.

I could not find any documentation about not putting a mov insn pattern at the
beginning of the md file. Therefore I assume it's a bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/55036] Compiler fails with message "internal compiler error: in reg_save_code, at caller-save.c:158"
  2012-10-23 14:25 [Bug target/55036] New: Compiler fails with message "internal compiler error: in reg_save_code, at caller-save.c:158" jantlatlik at gmail dot com
@ 2013-05-10  6:21 ` segher at gcc dot gnu.org
  2014-01-11 10:13 ` ebotcazou at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: segher at gcc dot gnu.org @ 2013-05-10  6:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55036

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-05-10
                 CC|                            |segher at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Yes, it's a bug.

The various places in caller-save.c that test cached_reg_save_code[...] != 0
should be testing it >= 0.  Same for cached_reg_restore_code[...].


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/55036] Compiler fails with message "internal compiler error: in reg_save_code, at caller-save.c:158"
  2012-10-23 14:25 [Bug target/55036] New: Compiler fails with message "internal compiler error: in reg_save_code, at caller-save.c:158" jantlatlik at gmail dot com
  2013-05-10  6:21 ` [Bug target/55036] " segher at gcc dot gnu.org
@ 2014-01-11 10:13 ` ebotcazou at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-01-11 10:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55036

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |ebotcazou at gcc dot gnu.org
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.8.0

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
2012-07-09  Steven Bosscher  <steven@gcc.gnu.org>

    * gensupport.c (init_rtx_reader_args_cb): Start counting code
    generating patterns from 1 to free up 0 for CODE_FOR_nothing.
    * gencodes.c (main): Give CODE_FOR_nothing the value 0.  Add
    the LAST_INSN_CODE marker at the end.
    * genoutput.c (nothing): New static struct data.
    (idata): Initialize to &nothing.
    (idata_end): Initialize to &nothing.next.
    (init_insn_for_nothing): New function to create dummy 'nothing' insn.
    (main): Use it.
    * genpeep.c (insn_code_number): Remove global variable.
    (gen_peephole): Take it as an argument instead.
    (main): Take insn_code_number from read_md_rtx.
    * optabs.h: Revert r161809:
    (optab_handlers): Change type of insn_code back to insn_code.
    (optab_handler, widening_optab_handler, set_optab_handler,
    set_widening_optab_handler, convert_optab_handler,
    set_convert_optab_handler, direct_optab_handler,
    set_direct_optab_handler): Remove int casts.
    Revert to treating the insn_code field as "insn_code".


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-11 10:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-23 14:25 [Bug target/55036] New: Compiler fails with message "internal compiler error: in reg_save_code, at caller-save.c:158" jantlatlik at gmail dot com
2013-05-10  6:21 ` [Bug target/55036] " segher at gcc dot gnu.org
2014-01-11 10:13 ` ebotcazou at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).