[Bug c++/90462] New: Internal compiler error with deprecated-copy and json diagnostics
schopf.dan at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue May 14 13:09:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90462
Bug ID: 90462
Summary: Internal compiler error with deprecated-copy and json
diagnostics
Product: gcc
Version: 9.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: schopf.dan at gmail dot com
Target Milestone: ---
Created attachment 46351
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46351&action=edit
source code which crashes
When using the new json diagnostics output there is an internal
compiler error due to a deprecated-copy warning. The original
issue has been found in the Boost regex library, I have used
creduce to create a minimal test case.
It can be reproduced with GCC 9.1.0 and the attached code using
this command line:
$ g++ -Wdeprecated-copy -fdiagnostics-format=json deprecated-copy-crash.cc
Internal compiler error: Error reporting routines re-entered.
0x7f49dce76e4a __libc_start_main
../csu/libc-start.c:308
The regular text output works as expected:
$ g++ -Wdeprecated-copy -fdiagnostics-format=text deprecated-copy-crash.cc
...
deprecated-copy-crash.cc: In instantiation of ‘void h<
<template-parameter-1-1>, <template-parameter-1-2> >::o(const i*, const i*,
unsigned int) [with i = char; <template-parameter-1-2> = int]’:
deprecated-copy-crash.cc:22:5: required from ‘void b<
<template-parameter-1-1> >::assign() [with i = char]’
deprecated-copy-crash.cc:28:12: required from ‘s<i, t>& s<i,
<template-parameter-1-2> >::p(const i*, const i*, f::g) [with i = char;
<template-parameter-1-2> = e<char>; f::g = int]’
deprecated-copy-crash.cc:45:77: required from here
deprecated-copy-crash.cc:43:5: warning: implicitly-declared ‘constexpr G&
G::operator=(const G&)’ is deprecated [-Wdeprecated-copy]
43 | a = r();
deprecated-copy-crash.cc:33:3: note: because ‘G’ has user-provided ‘G::G(G&)’
33 | G(G &);
| ^
...
Problem also seems to be reproducible on trunk: https://godbolt.org/z/5aT3K1
More information about the Gcc-bugs
mailing list