public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12279] New: VAX casesi causes ICE
@ 2003-09-14 20:15 matt at 3am-software dot com
  2003-09-14 20:24 ` [Bug target/12279] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: matt at 3am-software dot com @ 2003-09-14 20:15 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: VAX casesi causes ICE
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: matt at 3am-software dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386--netbsdelf
  GCC host triplet: i386--netbsdelf
GCC target triplet: vax--netbsdelf

typedef long unsigned int size_t;
int snprintf (char * __restrict, size_t, const char * __restrict, ...)
     __attribute__((__format__(__printf__, 3, 4)));

int
outfmt(char *obuf, size_t len, char fmt, double b)
{
    switch (fmt) {
 case 'G':
     return snprintf(obuf, len, "%.2f GB", b / 1024.0 / 1024.0 / 1024.0);
     break;
 default:
 case 'K':
     return snprintf(obuf, len, "%.2f KB", b / 1024.0);
     break;
 case 'M':
     return snprintf(obuf, len, "%.2f MB", b / 1024.0 / 1024.0);
     break;
 case 'g':
     return snprintf(obuf, len, "%.2f Gbit", b * 8.0 / 1024.0 / 1024.0 / 1024.0);
     break;
 case 'k':
     return snprintf(obuf, len, "%.2f Kbit", b * 8.0 / 1024.0);
     break;
 case 'm':
     return snprintf(obuf, len, "%.2f Mbit", b * 8.0 / 1024.0 / 1024.0);
     break;
    }
}

Compiling that via:
./xgcc -S -O2 -B./ -v -c /tmp/x.i 
Reading specs from ./specs
Configured with: '/u2/toolchain/gcc/configure' '--target=vax--netbsdelf : (reconfigured) '/u2/
toolchain/gcc/configure' '--target=vax--netbsdelf '--disable-multilib
Thread model: single
gcc version 3.4 20030913 (experimental)
 ./cc1 -fpreprocessed /tmp/x.i -quiet -dumpbase x.i -auxbase x -O2 -version -o x.s
GNU C version 3.4 20030913 (experimental) (vax--netbsdelf)
        compiled by GNU C version 2.95.3 20010315 (release) (NetBSD nb4).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
/tmp/x.i: In function `outfmt':

/tmp/x.i:29: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

#0  0x837f348 in label_is_jump_target_p (label=0x484fe5f0, 
    jump_insn=0x48574580) at /u2/toolchain/gcc/gcc/cfgcleanup.c:665
#1  0x838107c in try_optimize_cfg (mode=256)
    at /u2/toolchain/gcc/gcc/cfgcleanup.c:1715
#2  0x838157c in cleanup_cfg (mode=256)
    at /u2/toolchain/gcc/gcc/cfgcleanup.c:1915
#3  0x8124587 in cfg_layout_initialize ()
    at /u2/toolchain/gcc/gcc/cfglayout.c:1128
#4  0x8378131 in reorder_basic_blocks ()
    at /u2/toolchain/gcc/gcc/bb-reorder.c:1067
#5  0x8324c6b in rest_of_handle_reorder_blocks (decl=0x48573870, 
    insns=0x484fb440) at /u2/toolchain/gcc/gcc/toplev.c:2280
#6  0x83270ff in rest_of_compilation (decl=0x48573870)
    at /u2/toolchain/gcc/gcc/toplev.c:3481
#7  0x83717c3 in tree_rest_of_compilation (fndecl=0x48573870, 
    nested_p=0 '\000') at /u2/toolchain/gcc/gcc/tree-optimize.c:165
#8  0x807cbf3 in c_expand_body_1 (fndecl=0x48573870, nested_p=0)
    at /u2/toolchain/gcc/gcc/c-decl.c:6190
#9  0x807cdf8 in c_expand_body (fndecl=0x48573870)
    at /u2/toolchain/gcc/gcc/c-decl.c:6220
#10 0x8373fa5 in cgraph_expand_function (node=0x48577360)
    at /u2/toolchain/gcc/gcc/cgraphunit.c:481
#11 0x8375c0b in cgraph_expand_functions ()
    at /u2/toolchain/gcc/gcc/cgraphunit.c:1224
#12 0x8375e20 in cgraph_optimize () at /u2/toolchain/gcc/gcc/cgraphunit.c:1288
#13 0x80e495b in c_objc_common_finish_file ()
    at /u2/toolchain/gcc/gcc/c-objc-common.c:249
#14 0x8056bb3 in finish_file () at /u2/toolchain/gcc/gcc/c-lang.c:231
#15 0x80d5ab6 in c_common_parse_file (set_yydebug=0)
    at /u2/toolchain/gcc/gcc/c-opts.c:1216
#16 0x8323ebb in compile_file () at /u2/toolchain/gcc/gcc/toplev.c:1792
#17 0x83289e0 in do_compile () at /u2/toolchain/gcc/gcc/toplev.c:4484
#18 0x8328a79 in toplev_main (argc=3, argv=0xbfbffaf8)
    at /u2/toolchain/gcc/gcc/toplev.c:4524
#19 0x80f6682 in main (argc=3, argv=0xbfbffaf8)
    at /u2/toolchain/gcc/gcc/main.c:35
#20 0x8049a94 in ___start ()

line 664 is returning a bogus value for vec
664           rtvec vec = XVEC (tmp, GET_CODE (tmp) == ADDR_DIFF_VEC);
(gdb) print vec
$1 = 0x85

(gdb) print debug_rtx (jump_insn)
(jump_insn 131 130 15 0 /tmp/x.c:9 (set (pc)
        (if_then_else (leu (minus:SI (reg:SI 0 %r0 [orig:69 fmt ] [69])
                    (const_int 71 [0x47]))
                (const_int 38 [0x26]))
            (plus:SI (sign_extend:SI (mem:HI (plus:SI (mult:SI (minus:SI (reg:SI 0 %r0 [orig:69 fmt ] [69])
                                    (const_int 71 [0x47]))
                                (const_int 2 [0x2]))
                            (pc)) [0 S2 A8]))
                (label_ref:SI 132))
            (pc))) 142 {casesi1} (insn_list 130 (nil))
    (expr_list:REG_DEAD (reg:SI 0 %r0 [orig:69 fmt ] [69])
        (nil)))
$2 = void
(gdb) print debug_rtx (tmp)
(jump_insn 133 132 0 /tmp/x.c:9 (addr_diff_vec:HI (label_ref:SI 132)
         [
            (label_ref:SI 15)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 52)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 70)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 36)
            (label_ref:SI 92)
            (label_ref:SI 36)
            (label_ref:SI 110)
        ]
        (const_int 0 [0x0])
        (const_int 0 [0x0])) -1 (nil)
    (nil))
$3 = void


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

* [Bug target/12279] VAX casesi causes ICE
  2003-09-14 20:15 [Bug c/12279] New: VAX casesi causes ICE matt at 3am-software dot com
@ 2003-09-14 20:24 ` pinskia at gcc dot gnu dot org
  2003-09-15  1:43 ` [Bug optimization/12279] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-14 20:24 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |target
           Keywords|                            |ice-on-valid-code


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

* [Bug optimization/12279] VAX casesi causes ICE
  2003-09-14 20:15 [Bug c/12279] New: VAX casesi causes ICE matt at 3am-software dot com
  2003-09-14 20:24 ` [Bug target/12279] " pinskia at gcc dot gnu dot org
@ 2003-09-15  1:43 ` pinskia at gcc dot gnu dot org
  2003-09-16 20:20 ` ian at airs dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-15  1:43 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |optimization


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-15 00:51 -------
This has been happening since at least 20030626.


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

* [Bug optimization/12279] VAX casesi causes ICE
  2003-09-14 20:15 [Bug c/12279] New: VAX casesi causes ICE matt at 3am-software dot com
  2003-09-14 20:24 ` [Bug target/12279] " pinskia at gcc dot gnu dot org
  2003-09-15  1:43 ` [Bug optimization/12279] " pinskia at gcc dot gnu dot org
@ 2003-09-16 20:20 ` ian at airs dot com
  2003-09-16 21:23 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ian at airs dot com @ 2003-09-16 20:20 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From ian at airs dot com  2003-09-16 19:47 -------
Created an attachment (id=4772)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4772&action=view)
This patch to cfgcleanup.c fixes the bug

This patch to cfgcleanup.c fixes the bug.  It corrects an erroneous change made
on 2003-03-30.


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

* [Bug optimization/12279] VAX casesi causes ICE
  2003-09-14 20:15 [Bug c/12279] New: VAX casesi causes ICE matt at 3am-software dot com
                   ` (2 preceding siblings ...)
  2003-09-16 20:20 ` ian at airs dot com
@ 2003-09-16 21:23 ` pinskia at gcc dot gnu dot org
  2003-09-16 22:19 ` ian at airs dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-16 21:23 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-09-16 19:51:49
               date|                            |


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

* [Bug optimization/12279] VAX casesi causes ICE
  2003-09-14 20:15 [Bug c/12279] New: VAX casesi causes ICE matt at 3am-software dot com
                   ` (3 preceding siblings ...)
  2003-09-16 21:23 ` pinskia at gcc dot gnu dot org
@ 2003-09-16 22:19 ` ian at airs dot com
  2003-09-17  0:15 ` bangerth at dealii dot org
  2003-10-17 17:50 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: ian at airs dot com @ 2003-09-16 22:19 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From ian at airs dot com  2003-09-16 21:23 -------
The cfgcleanup patch has been checked in, and this bug can be closed.  I don't
know how to close it, though.


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

* [Bug optimization/12279] VAX casesi causes ICE
  2003-09-14 20:15 [Bug c/12279] New: VAX casesi causes ICE matt at 3am-software dot com
                   ` (4 preceding siblings ...)
  2003-09-16 22:19 ` ian at airs dot com
@ 2003-09-17  0:15 ` bangerth at dealii dot org
  2003-10-17 17:50 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2003-09-17  0:15 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From bangerth at dealii dot org  2003-09-16 21:56 -------
Done thusly. 
W.


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

* [Bug optimization/12279] VAX casesi causes ICE
  2003-09-14 20:15 [Bug c/12279] New: VAX casesi causes ICE matt at 3am-software dot com
                   ` (5 preceding siblings ...)
  2003-09-17  0:15 ` bangerth at dealii dot org
@ 2003-10-17 17:50 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-17 17:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4


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

end of thread, other threads:[~2003-10-17 17:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-14 20:15 [Bug c/12279] New: VAX casesi causes ICE matt at 3am-software dot com
2003-09-14 20:24 ` [Bug target/12279] " pinskia at gcc dot gnu dot org
2003-09-15  1:43 ` [Bug optimization/12279] " pinskia at gcc dot gnu dot org
2003-09-16 20:20 ` ian at airs dot com
2003-09-16 21:23 ` pinskia at gcc dot gnu dot org
2003-09-16 22:19 ` ian at airs dot com
2003-09-17  0:15 ` bangerth at dealii dot org
2003-10-17 17:50 ` pinskia at gcc dot gnu dot 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).