https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81485
Bug ID: 81485
Summary: [SH] ICE: in sh_find_set_of_reg, at
config/sh/sh-protos.h:232
Product: gcc
Version: 7.1.0
URL: https://people.debian.org/~glaubitz/totem-pl-parser_3.
10.8-1_sh4.build
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: glaubitz at physik dot fu-berlin.de
CC: kkojima at gcc dot gnu.org, olegendo at gcc dot gnu.org
Target Milestone: ---
Target: sh*-*-*
Created attachment 41790
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41790&action=edit
Preprocessed source cclGjyyS.out (gzipped)
Trying to build totem-pl-parser on Debian unstable sh4 bails out with an
internal compiler error [1]:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../plparse
-DGNOMELOCALEDIR=\"/usr/share/locale\"
-DLIBEXECDIR=\"/usr/lib/sh4-linux-gnu/libtotem-plparser18\" -Wdate-time
-D_FORTIFY_SOURCE=2 -pthread -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-pthread -I/usr/include/libsoup-2.4 -I/usr/include/libxml2
-I/usr/include/gmime-2.6 -I/usr/include/glib-2.0
-I/usr/lib/sh4-linux-gnu/glib-2.0/include -fno-strict-aliasing -Wall -Wextra
-Wundef -Wnested-externs -Wwrite-strings -Wpointer-arith -Wmissing-declarations
-Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls
-Wno-unused-parameter -Wno-missing-field-initializers
-Wdeclaration-after-statement -Wformat=2 -Wold-style-definition -Wcast-align
-Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow
-Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self
-Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds
-Wimplicit-function-declaration -Wreturn-type -Wswitch-enum -Wswitch-default
-Wno-error=unused-parameter -Wno-error=missing-field-initializers
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I../lib -D_GNU_SOURCE -g -O2
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -c totem-pl-parser-pla.c -fPIC -DPIC -o
.libs/libtotem_plparser_la-totem-pl-parser-pla.o
(...)
totem-pl-parser-pla.c: In function 'totem_pl_parser_save_pla':
totem-pl-parser-pla.c:67:4: warning: cast increases required alignment of
target type [-Wcast-align]
*((gint32 *)buffer) = GINT32_TO_BE (num_entries_total);
^
In file included from /usr/include/glib-2.0/glib/galloca.h:32:0,
from /usr/include/glib-2.0/glib.h:30,
from totem-pl-parser-pla.c:26:
totem-pl-parser-pla.c: In function 'totem_pl_parser_add_pla':
totem-pl-parser-pla.c:189:34: warning: cast increases required alignment of
target type [-Wcast-align]
max_entries = GINT32_FROM_BE (*((gint32 *)contents));
^
/usr/include/glib-2.0/glib/gtypes.h:184:77: note: in definition of macro
'GUINT32_SWAP_LE_BE'
# define GUINT32_SWAP_LE_BE(val) ((guint32) __builtin_bswap32 ((gint32)
(val)))
^~~
/usr/include/glib-2.0/glib/gtypes.h:351:30: note: in expansion of macro
'GINT32_TO_BE'
#define GINT32_FROM_BE(val) (GINT32_TO_BE (val))
^~~~~~~~~~~~
totem-pl-parser-pla.c:189:16: note: in expansion of macro 'GINT32_FROM_BE'
max_entries = GINT32_FROM_BE (*((gint32 *)contents));
^~~~~~~~~~~~~~
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../plparse
-DGNOMELOCALEDIR=\"/usr/share/locale\"
-DLIBEXECDIR=\"/usr/lib/sh4-linux-gnu/libtotem-plparser18\" -Wdate-time
-D_FORTIFY_SOURCE=2 -pthread -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-pthread -I/usr/include/libsoup-2.4 -I/usr/include/libxml2
-I/usr/include/gmime-2.6 -I/usr/include/glib-2.0
-I/usr/lib/sh4-linux-gnu/glib-2.0/include -fno-strict-aliasing -Wall -Wextra
-Wundef -Wnested-externs -Wwrite-strings -Wpointer-arith -Wmissing-declarations
-Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls
-Wno-unused-parameter -Wno-missing-field-initializers
-Wdeclaration-after-statement -Wformat=2 -Wold-style-definition -Wcast-align
-Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow
-Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self
-Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds
-Wimplicit-function-declaration -Wreturn-type -Wswitch-enum -Wswitch-default
-Wno-error=unused-parameter -Wno-error=missing-field-initializers
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I../lib -D_GNU_SOURCE -g -O2
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -c totem-pl-parser-misc.c -o
libtotem_plparser_la-totem-pl-parser-misc.o >/dev/null 2>&1
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../plparse
-DGNOMELOCALEDIR=\"/usr/share/locale\"
-DLIBEXECDIR=\"/usr/lib/sh4-linux-gnu/libtotem-plparser18\" -Wdate-time
-D_FORTIFY_SOURCE=2 -pthread -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-pthread -I/usr/include/libsoup-2.4 -I/usr/include/libxml2
-I/usr/include/gmime-2.6 -I/usr/include/glib-2.0
-I/usr/lib/sh4-linux-gnu/glib-2.0/include -fno-strict-aliasing -Wall -Wextra
-Wundef -Wnested-externs -Wwrite-strings -Wpointer-arith -Wmissing-declarations
-Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls
-Wno-unused-parameter -Wno-missing-field-initializers
-Wdeclaration-after-statement -Wformat=2 -Wold-style-definition -Wcast-align
-Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow
-Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self
-Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds
-Wimplicit-function-declaration -Wreturn-type -Wswitch-enum -Wswitch-default
-Wno-error=unused-parameter -Wno-error=missing-field-initializers
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I../lib -D_GNU_SOURCE -g -O2
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -c totem-pl-parser-amz.c -o
libtotem_plparser_la-totem-pl-parser-amz.o >/dev/null 2>&1
totem-pl-parser-pla.c:256:1: internal compiler error: in sh_find_set_of_reg, at
config/sh/sh-protos.h:232
}
^
mmap: Permission denied
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
In file included from /usr/include/glib-2.0/glib/giochannel.h:34:0,
from /usr/include/glib-2.0/glib.h:54,
from totem-pl-parser-lines.c:27:
totem-pl-parser-lines.c: In function 'totem_pl_parser_add_ram':
/usr/include/glib-2.0/glib/gstring.h:161:1: warning: inlining failed in call to
'g_string_append_c_inline': call is unlikely and code size would grow
[-Winline]
g_string_append_c_inline (GString *gstring,
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gstring.h:173:41: note: called from here
#define g_string_append_c(gstr,c) g_string_append_c_inline (gstr, c)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
totem-pl-parser-lines.c:231:5: note: in expansion of macro 'g_string_append_c'
g_string_append_c (str, '?');
^~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gstring.h:161:1: warning: inlining failed in call to
'g_string_append_c_inline': call is unlikely and code size would grow
[-Winline]
g_string_append_c_inline (GString *gstring,
^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gstring.h:173:41: note: called from here
#define g_string_append_c(gstr,c) g_string_append_c_inline (gstr, c)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
totem-pl-parser-lines.c:233:5: note: in expansion of macro 'g_string_append_c'
g_string_append_c (str, '&');
^~~~~~~~~~~~~~~~~
I was able to work-around this problem by adding "-mlra" to CFLAGS which made
the package build fine.
(...)
Preprocessed source stored into /tmp/cclGjyyS.out file, please attach this to
your bugreport.
I'm attaching the pre-processed source.
> [1] https://people.debian.org/~glaubitz/totem-pl-parser_3.10.8-1_sh4.build