This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70449] New: ICE with -Wall on valid code on x86_64-linux-gnu in pp_string, at pretty-print.c:928
- From: "su at cs dot ucdavis.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 30 Mar 2016 06:47:18 +0000
- Subject: [Bug c++/70449] New: ICE with -Wall on valid code on x86_64-linux-gnu in pp_string, at pretty-print.c:928
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70449
Bug ID: 70449
Summary: ICE with -Wall on valid code on x86_64-linux-gnu in
pp_string, at pretty-print.c:928
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
Target Milestone: ---
The following code causes an ICE when compiled with the current GCC trunk with
-Wall on x86_64-linux-gnu in both 32-bit and 64-bit modes.
This is a regression from 5.3.x.
$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 6.0.0 20160329 (experimental) [trunk revision 234516] (GCC)
$
$ g++-trunk -c small.cpp
$ g++-5.3 -c -Wall -std=c++14 small.cpp
: In instantiation of âconstexpr int f() [with int I = 0]â:
small.cpp:4:22: required from here
cc1plus: warning: no return statement in function returning non-void
[-Wreturn-type]
$
$ g++-trunk -c -Wall small.cpp
in pp_string, at pretty-print.c:928
0x15173f6 pp_string(pretty_printer*, char const*)
../../gcc-source-trunk/gcc/pretty-print.c:928
0x1517d22 pp_format(pretty_printer*, text_info*)
../../gcc-source-trunk/gcc/pretty-print.c:570
0x1518870 pp_format_verbatim(pretty_printer*, text_info*)
../../gcc-source-trunk/gcc/pretty-print.c:692
0x1518944 pp_verbatim(pretty_printer*, char const*, ...)
../../gcc-source-trunk/gcc/pretty-print.c:893
0x70cd08 print_instantiation_full_context
../../gcc-source-trunk/gcc/cp/error.c:3320
0x70cd08 maybe_print_instantiation_context
../../gcc-source-trunk/gcc/cp/error.c:3463
0x71734f cp_diagnostic_starter
../../gcc-source-trunk/gcc/cp/error.c:3156
0x151344c diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
../../gcc-source-trunk/gcc/diagnostic.c:826
0x1513b44 warning(int, char const*, ...)
../../gcc-source-trunk/gcc/diagnostic.c:1006
0x657e2e finish_function(int)
../../gcc-source-trunk/gcc/cp/decl.c:14755
0x67b6b2 instantiate_decl(tree_node*, int, bool)
../../gcc-source-trunk/gcc/cp/pt.c:22035
0x84bd62 cxx_eval_call_expression
../../gcc-source-trunk/gcc/cp/constexpr.c:1297
0x84dadf cxx_eval_constant_expression
../../gcc-source-trunk/gcc/cp/constexpr.c:3423
0x853c19 cxx_eval_outermost_constant_expr
../../gcc-source-trunk/gcc/cp/constexpr.c:3988
0x856bb5 fold_non_dependent_expr(tree_node*)
../../gcc-source-trunk/gcc/cp/constexpr.c:4251
0x649d97 build_enumerator(tree_node*, tree_node*, tree_node*, tree_node*,
unsigned int)
../../gcc-source-trunk/gcc/cp/decl.c:13484
0x746062 cp_parser_enumerator_definition
../../gcc-source-trunk/gcc/cp/parser.c:17414
0x746062 cp_parser_enumerator_list
../../gcc-source-trunk/gcc/cp/parser.c:17343
0x746062 cp_parser_enum_specifier
../../gcc-source-trunk/gcc/cp/parser.c:17270
0x72f4b9 cp_parser_type_specifier
../../gcc-source-trunk/gcc/cp/parser.c:15806
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$
---------------------------
template <int I>
constexpr int f ()
{
enum E { a = f<0> () };
return 0;
}