public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/59847] New: cast to long makes compiler crash if using option pdp-11/10
@ 2014-01-16 18:46 mattis at mattisborgen dot se
  2021-03-19 22:09 ` [Bug target/59847] " pkoning at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: mattis at mattisborgen dot se @ 2014-01-16 18:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59847
           Summary: cast to long makes compiler crash if using option
                    pdp-11/10
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mattis at mattisborgen dot se

mattis@mattis-VirtualBox:~$ pdp11-aout-gcc   -m10 -S  longtest.c
longtest.c: In function 'test':
longtest.c:5:1: error: unrecognizable insn:
 }
 ^
(insn 7 6 10 2 (set (mem/c:SI (plus:HI (reg/f:HI 17 virtual-stack-vars)
                (const_int -4 [0xfffffffc])) [0 a+0 S4 A16])
        (sign_extend:SI (mem/c:HI (plus:HI (reg/f:HI 17 virtual-stack-vars)
                    (const_int -6 [0xfffffffa])) [0 b+0 S2 A16]))) longtest.c:4
-1
     (nil))
longtest.c:5:1: internal compiler error: in extract_insn, at recog.c:2154
0x837d527 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
    ../src/gcc/rtl-error.c:109
0x837d571 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
    ../src/gcc/rtl-error.c:117
0x8355394 extract_insn(rtx_def*)
    ../src/gcc/recog.c:2154
0x825d34e instantiate_virtual_regs_in_insn
    ../src/gcc/function.c:1561
0x825d34e instantiate_virtual_regs
    ../src/gcc/function.c:1928
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
mattis@mattis-VirtualBox:~$ pdp11-aout-gcc  -v
Using built-in specs.
COLLECT_GCC=pdp11-aout-gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/pdp11-aout/4.8.2/lto-wrapper
Target: pdp11-aout
Configured with: src/configure --target=pdp11-aout --disable-nls
--without-headers --enable-languages=c
Thread model: single
gcc version 4.8.2 (GCC) 


Linux mattis-VirtualBox 3.8.0-34-generic #49~precise1-Ubuntu SMP Wed Nov 13
18:08:04 UTC 2013 i686 i686 i386 GNU/Linux

Please note that if using -m40 or -m45 instead this problem goes away:

mattis@mattis-VirtualBox:~$ pdp11-aout-gcc   -m40 -S  longtest.c
mattis@mattis-VirtualBox:~$ cat longtest.s
    .text

    .even
    .globl _test
_test:
    mov r5, -(sp)
    mov sp, r5
    add $-06, sp
    clr -04(r5)
    mov $012,-02(r5)
    mov $012, -06(r5)
    mov -06(r5), -02(r5)
    sxt -04(r5)
    mov r5, sp
    mov (sp)+, r5
    rts pc
mattis@mattis-VirtualBox:~$ 

mattis@mattis-VirtualBox:~$ cat longtest.c
test () {
  long a=10;
  short b=10;
  a = (long) b;
}


It appears that the cast is causing the problem since removing it makes it
compile.


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

* [Bug target/59847] cast to long makes compiler crash if using option pdp-11/10
  2014-01-16 18:46 [Bug c/59847] New: cast to long makes compiler crash if using option pdp-11/10 mattis at mattisborgen dot se
@ 2021-03-19 22:09 ` pkoning at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pkoning at gcc dot gnu.org @ 2021-03-19 22:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59847

pkoning at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2021-03-19
     Ever confirmed|0                           |1

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

end of thread, other threads:[~2021-03-19 22:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-16 18:46 [Bug c/59847] New: cast to long makes compiler crash if using option pdp-11/10 mattis at mattisborgen dot se
2021-03-19 22:09 ` [Bug target/59847] " pkoning 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).