public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102757] New: ICE on amd64 (internal compiler error: in expand_expr_real_1, at expr.c:10014)
@ 2021-10-15 1:43 sam at gentoo dot org
2021-10-15 1:54 ` [Bug c++/102757] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: sam at gentoo dot org @ 2021-10-15 1:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102757
Bug ID: 102757
Summary: ICE on amd64 (internal compiler error: in
expand_expr_real_1, at expr.c:10014)
Product: gcc
Version: 9.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: sam at gentoo dot org
Target Milestone: ---
Created attachment 51605
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51605&action=edit
logging.ii (minimised reproducer)
Originally reported downstream at https://bugs.gentoo.org/806094.
I hit the issue when building android-tools-31.0.0_p1. Note that this issue
does not seem to occur with gcc 10.3.0 or gcc 11.2.0.
I've managed to minimise the crasher to:
```
$ cat logging.ii
struct Trans_NS___cxx11_basic_string {
int *c_str();
};
int snprintf(...);
enum LogSeverity {};
enum LogId {};
template <typename F>
void SplitByLogdChunks(LogId, LogSeverity, char *, char *, int, char *msg, F) {
long max_size;
Trans_NS___cxx11_basic_string file_header;
char logd_chunk[max_size];
auto write_to_logd_chunk = [&](char *, int) {
*file_header.c_str() = snprintf(sizeof(logd_chunk));
};
char newline;
write_to_logd_chunk(msg, newline);
}
void LogdLogChunk();
LogId LogdLogger_id;
LogSeverity LogdLogger_severity;
char LogdLogger_tag, LogdLogger_file, LogdLogger_message;
int LogdLogger_line;
void LogdLogger() {
SplitByLogdChunks(LogdLogger_id, LogdLogger_severity, &LogdLogger_tag,
&LogdLogger_file, LogdLogger_line, &LogdLogger_message,
LogdLogChunk);
}
```
It can be induced via:
```
$ x86_64-pc-linux-gnu-g++ logging.ii
during RTL pass: expand
logging.ii: In lambda function:
logging.ii:13:36: internal compiler error: in expand_expr_real_1, at
expr.c:10014
13 | *file_header.c_str() = snprintf(sizeof(logd_chunk));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
unrecognized DWARF version in .debug_info at 6
unrecognized DWARF version in .debug_info at 6
unrecognized DWARF version in .debug_info at 6
unrecognized DWARF version in .debug_info at 6
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
```
```
$ x86_64-pc-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=x86_64-pc-linux-gnu-g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/9.4.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-9.4.0/work/gcc-9.4.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/9.4.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.4.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.4.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.4.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.4.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.4.0/include/g++-v9
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/9.4.0/python
--enable-languages=c,c++,jit,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 9.4.0
p1' --enable-esp --enable-libstdcxx-time --enable-host-shared --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point
--enable-targets=all --enable-libgomp --disable-libssp --disable-libada
--disable-systemtap --disable-vtable-verify --disable-libvtv --enable-lto
--with-isl --disable-isl-version-check --enable-default-pie
--enable-default-ssp
Thread model: posix
gcc version 9.4.0 (Gentoo Hardened 9.4.0 p1)
```
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/102757] ICE on amd64 (internal compiler error: in expand_expr_real_1, at expr.c:10014)
2021-10-15 1:43 [Bug c++/102757] New: ICE on amd64 (internal compiler error: in expand_expr_real_1, at expr.c:10014) sam at gentoo dot org
@ 2021-10-15 1:54 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-15 1:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102757
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 86216.
*** This bug has been marked as a duplicate of bug 86216 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-15 1:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 1:43 [Bug c++/102757] New: ICE on amd64 (internal compiler error: in expand_expr_real_1, at expr.c:10014) sam at gentoo dot org
2021-10-15 1:54 ` [Bug c++/102757] " pinskia 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).