NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/55265: NetBSD/sh3el 9.0 gcc 7.4.0 ICE by -fdce
>Number: 55265
>Category: toolchain
>Synopsis: NetBSD/sh3el 9.0 gcc 7.4.0 ICE by -fdce
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 14 22:10:00 +0000 2020
>Originator: Izumi Tsutsui
>Release: NetBSD 9.0
>Organization:
>Environment:
System: NetBSD lantank 9.0 NetBSD 9.0 (LANTANK) #1: Sun May 3 17:58:04 JST 2020 tsutsui@mirage:/s/netbsd-9/src/sys/arch/landisk/compile/LANTANK landisk
Architecture: sh3el
Machine: landisk
>Description:
During pkgsrc/x11/mlterm build on NetBSD/landisk 9.0, gcc 7.4.0 gets ICE:
---
../../libtool --mode=compile gcc -I../../baselib/include -I../../encodefilter/include -I/usr/pkg/include/fribidi -Os -freorder-blocks -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/include/freetype2 -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -DPNG_NO_ASSEMBLER_CODE -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/include/freetype2 -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include -DLIBDIR=\"/usr/pkg/lib\" -c -I../../baselib/include -I../../encodefilter/include -I/usr/pkg/include/fribidi -Os -freorder-blocks -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/include/freetype2 -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -DPNG_NO_ASSEMBLER_CODE -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/X11R7/inc!
lude/freetype2 -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include -DLIBDIR=\"/usr/pkg/lib\" vt_line_bidi.c
libtool: compile: gcc -I../../baselib/include -I../../encodefilter/include -I/usr/obj.sh3el/pkgsrc/x11/mlterm/work.sh3el/.buildlink/include/fribidi -Os -freorder-blocks -D_FORTIFY_SOURCE=2 -I/usr/obj.sh3el/pkgsrc/x11/mlterm/work.sh3el/.buildlink/include -I/usr/obj.sh3el/pkgsrc/x11/mlterm/work.sh3el/.x11-buildlink/include -I/usr/obj.sh3el/pkgsrc/x11/mlterm/work.sh3el/.x11-buildlink/include/freetype2 -I/usr/obj.sh3el/pkgsrc/x11/mlterm/work.sh3el/.buildlink/include/glib-2.0 -I/usr/obj.sh3el/pkgsrc/x11/mlterm/work.sh3el/.buildlink/include/gio-unix-2.0 -I/usr/obj.sh3el/pkgsrc/x11/mlterm/work.sh3el/.buildlink/lib/glib-2.0/include -DPNG_NO_ASSEMBLER_CODE -DLIBDIR=\"/usr/pkg/lib\" -c -Os -freorder-blocks -D_FORTIFY_SOURCE=2 -DPNG_NO_ASSEMBLER_CODE -DLIBDIR=\"/usr/pkg/lib\" vt_line_bidi.c -fPIC -DPIC -o .libs/vt_line_bidi.o
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
vt_line_bidi.c: In function 'vt_line_bidi_render':
vt_line_bidi.c:144:1: internal compiler error: Abort trap
}
^
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.NetBSD.org/support/send-pr.html> for instructions.
*** Error code 1
Stop.
---
>How-To-Repeat:
This ICE also happens on cross compiler on NetBSD/i386 9.0.
A sample code to reproduce is as the following:
---
struct vt_bidi_state {
char rtl_state;
};
typedef struct vt_bidi_state *vt_bidi_state_t;
typedef struct ctl_info {
vt_bidi_state_t bidi;
} ctl_info_t;
typedef struct vt_line {
ctl_info_t ctl_info;
} vt_line_t;
#define BASE_IS_RTL(state) ((((state)->rtl_state) >> 1) & 0x1)
extern int f1(void), f2(void), f3(void), f4(void);
int vt_line_bidi_render(vt_line_t *line)
{
int ret;
if (f1()) {
int base_was_rtl;
base_was_rtl = BASE_IS_RTL(line->ctl_info.bidi);
if ((ret = f2()) <= 0) {
if (base_was_rtl) {
f3();
}
return ret;
}
if (base_was_rtl != BASE_IS_RTL(line->ctl_info.bidi)) {
return 1;
}
}
if (ret == 2) {
f4();
}
return 1;
}
---
On NetBSD/i386 9.0 with 9.0 toolchain:
---
% /s/netbsd-9/src/obj.landisk/tooldir.NetBSD-9.0-i386/bin/shle--netbsdelf-gcc -O -c ~/vt_line_bidi.c
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
/home/tsutsui/vt_line_bidi.c: In function 'vt_line_bidi_render':
/home/tsutsui/vt_line_bidi.c:40:1: internal compiler error: Abort trap
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.NetBSD.org/Misc/send-pr.html> for instructions.
% /s/netbsd-9/src/obj.landisk/tooldir.NetBSD-9.0-i386/bin/shle--netbsdelf-gcc -O -fno-dce -c ~/vt_line_bidi.c
%
---
Also available on github gist:
https://gist.github.com/tsutsui/914960ca1739f2d696445024c13c9543
>Fix:
No idea.
"-fno-dce" works around on pkgsrc mlterm build as above.
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index