This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71195] New: [5 Regression] ICE in classify_argument on invalid code


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71195

            Bug ID: 71195
           Summary: [5 Regression] ICE in classify_argument on invalid
                    code
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

Created attachment 38523
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38523&action=edit
preprocessed source

The attached (invalid) testcase ICEs on the GCC 5 branch like

> g++-5 -S bug.cc -std=c++1y -B /abuild/rguenther/gcc5-g/gcc
In file included from /usr/include/boost/functional/hash/hash.hpp:20:0,
                 from /usr/include/boost/functional/hash.hpp:6,
                 from /home/user/src/evernus/ExternalOrderImporter.h:20,
                 from
/home/user/src/evernus/EveCentralExternalOrderImporter.h:19,
                 from
/home/user/src/evernus/EveCentralExternalOrderImporter.cpp:17:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/functional: In
constructor âstd::function<_Res(_ArgTypes ...)>::function(_Functor) [with
_Functor = Evernus::EveCentralExternalOrderImporter::fetchExternalOrders(const
TypeLocationPairs&) const::<lambda(auto:1&&, const auto:2&)>;
<template-parameter-2-2> = void; _Res = void; _ArgTypes =
{std::vector<Evernus::ExternalOrder, std::allocator<Evernus::ExternalOrder>
>&&, const QString&}]â:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/functional:2250:7:
internal compiler error: Segmentation fault
0xfa75c6 crash_signal
        /space/rguenther/src/svn/gcc-5-branch/gcc/toplev.c:383
0x6e0a9e contains_struct_check(tree_node const*, tree_node_structure_enum, char
const*, int, char const*)
        /space/rguenther/src/svn/gcc-5-branch/gcc/tree.h:3220
0x7d0d93 wi::extended_tree<128>::extended_tree(tree_node const*)
        /space/rguenther/src/svn/gcc-5-branch/gcc/tree.h:4939
0x7d07bd generic_wide_int<wi::extended_tree<128> >::generic_wide_int<tree_node
const*>(tree_node const* const&)
        /space/rguenther/src/svn/gcc-5-branch/gcc/wide-int.h:718
0x7d0791 wi::to_offset(tree_node const*)
        /space/rguenther/src/svn/gcc-5-branch/gcc/tree.h:4932
0xae7e74 int_bit_position(tree_node const*)
        /space/rguenther/src/svn/gcc-5-branch/gcc/tree.h:5080
0x131815b classify_argument
        /space/rguenther/src/svn/gcc-5-branch/gcc/config/i386/i386.c:6866
0x1318eb3 examine_argument
        /space/rguenther/src/svn/gcc-5-branch/gcc/config/i386/i386.c:7180
0x1319b17 function_arg_advance_64
        /space/rguenther/src/svn/gcc-5-branch/gcc/config/i386/i386.c:7582
0x1319ea3 ix86_function_arg_advance
        /space/rguenther/src/svn/gcc-5-branch/gcc/config/i386/i386.c:7671
0xc22627 gimplify_parameters()
        /space/rguenther/src/svn/gcc-5-branch/gcc/function.c:3889
0xd0eb67 gimplify_body(tree_node*, bool)
        /space/rguenther/src/svn/gcc-5-branch/gcc/gimplify.c:9256
0xd0f40f gimplify_function_tree(tree_node*)
        /space/rguenther/src/svn/gcc-5-branch/gcc/gimplify.c:9414
0xabb8ce cgraph_node::analyze()
        /space/rguenther/src/svn/gcc-5-branch/gcc/cgraphunit.c:634
0xabcba2 analyze_functions
        /space/rguenther/src/svn/gcc-5-branch/gcc/cgraphunit.c:1024
0xac0ff5 symbol_table::finalize_compilation_unit()
        /space/rguenther/src/svn/gcc-5-branch/gcc/cgraphunit.c:2453
0x8176ec cp_write_global_declarations()
        /space/rguenther/src/svn/gcc-5-branch/gcc/cp/decl2.c:4849
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.

while GCC 4.9 and GCC 6 report an error:

> g++-6 -S bug.cc -std=c++1y
/home/user/src/evernus/EveCentralExternalOrderImporter.cpp: In instantiation of
âEvernus::EveCentralExternalOrderImporter::fetchExternalOrders(const
TypeLocationPairs&) const::<lambda(auto:1&&, const auto:2&)> [with auto:1 =
std::vector<Evernus::ExternalOrder>; auto:2 = QString]â:
/home/user/src/evernus/EveCentralExternalOrderImporter.cpp:38:112:   required
by substitution of âtemplate<class auto:1, class auto:2>
Evernus::EveCentralExternalOrderImporter::fetchExternalOrders(const
TypeLocationPairs&) const::<lambda(auto:1&&, const auto:2&)>::operator decltype
(((Evernus::EveCentralExternalOrderImporter::fetchExternalOrders(const
TypeLocationPairs&) const::<lambda(auto:1&&, const
auto:2&)>)0u).operator()(static_cast<auto:1&&>(<anonymous>), static_cast<const
auto:2&>(<anonymous>))) (*)(auto:1&&, const auto:2&)() const [with auto:1 =
std::vector<Evernus::ExternalOrder>; auto:2 = QString]â
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/functional:1981:45:  
required by substitution of âtemplate<class _Functor, class>
std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor =
Evernus::EveCentralExternalOrderImporter::fetchExternalOrders(const
TypeLocationPairs&) const::<lambda(auto:1&&, const auto:2&)>;
<template-parameter-1-2> = <missing>]â
/home/user/src/evernus/EveCentralExternalOrderImporter.cpp:40:10:   required
from here
/home/user/src/evernus/EveCentralExternalOrderImporter.cpp:39:13: error: cannot
call member function âvoid
Evernus::EveCentralExternalOrderImporter::processResult(std::vector<Evernus::ExternalOrder>&&,
const QString&) constâ without object

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]