public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97582] New: Regression Internal compiler error in lambda
@ 2020-10-26 14:08 benjamin.freist at hexagon dot com
  2020-10-26 14:59 ` [Bug c++/97582] [9/10/11 Regression] ICE tree check: expected function_type or method_type, have error_mark in add_function_candidate, at cp/call.c:2146 since r9-6405-gbddee796d0b4800b marxin at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: benjamin.freist at hexagon dot com @ 2020-10-26 14:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97582
           Summary: Regression Internal compiler error in lambda
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: benjamin.freist at hexagon dot com
  Target Milestone: ---

Created attachment 49440
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49440&action=edit
ICE can be reproduced with this

This is an ICE that we noticed when upgrading from gcc 7 to 9.
I tried to remove everything that doesn't trigger the bug. The resulting source
file is attached to this report.

The command line to reproduce is g++ -std=c++17 -c crash_obfuscated.cpp

I'm using ubuntu 20.04
lsb_release -a
LSB Version:   
core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch

Does not appear on gcc 7.

g++-7 --version
g++-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0

g++-7 -std=c++17 -c ~/Desktop/crash_obfuscated.cpp
works fine

Appears on gcc 9.

g++ --version
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

g++ -std=c++17 -c ~/Desktop/crash_obfuscated.cpp 
crash_obfuscated.cpp: In instantiation of ‘C5::get()::<lambda(auto:1)> [with
auto:1 = C6]’:
/usr/include/c++/9/bits/predefined_ops.h:283:11:   required from ‘bool
__gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator
= __gnu_cxx::__normal_iterator<C6*, std::vector<C6> >; _Predicate =
C5::get()::<lambda(auto:1)>]’
/usr/include/c++/9/bits/stl_algo.h:120:14:   required from
‘_RandomAccessIterator std::__find_if(_RandomAccessIterator,
_RandomAccessIterator, _Predicate, std::random_access_iterator_tag) [with
_RandomAccessIterator = __gnu_cxx::__normal_iterator<C6*, std::vector<C6> >;
_Predicate = __gnu_cxx::__ops::_Iter_pred<C5::get()::<lambda(auto:1)> >]’
/usr/include/c++/9/bits/stl_algo.h:161:23:   required from ‘_Iterator
std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator =
__gnu_cxx::__normal_iterator<C6*, std::vector<C6> >; _Predicate =
__gnu_cxx::__ops::_Iter_pred<C5::get()::<lambda(auto:1)> >]’
/usr/include/c++/9/bits/stl_algo.h:3963:28:   required from ‘_IIter
std::find_if(_IIter, _IIter, _Predicate) [with _IIter =
__gnu_cxx::__normal_iterator<C6*, std::vector<C6> >; _Predicate =
C5::get()::<lambda(auto:1)>]’
/usr/include/c++/9/bits/stl_algo.h:526:47:   required from ‘bool
std::none_of(_IIter, _IIter, _Predicate) [with _IIter =
__gnu_cxx::__normal_iterator<C6*, std::vector<C6> >; _Predicate =
C5::get()::<lambda(auto:1)>]’
/usr/include/c++/9/bits/stl_algo.h:544:27:   required from ‘bool
std::any_of(_IIter, _IIter, _Predicate) [with _IIter =
__gnu_cxx::__normal_iterator<C6*, std::vector<C6> >; _Predicate =
C5::get()::<lambda(auto:1)>]’
/home/freist@volumegraphics.com/Desktop/crash_obfuscated.cpp:77:6:   required
from here
/home/freist@volumegraphics.com/Desktop/crash_obfuscated.cpp:76:61: internal
compiler error: Segmentation fault
   76 |       return find (v2.begin (), v2.end (), elem.getLink ()) == v2.end
();
      |             
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-07  9:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 14:08 [Bug c++/97582] New: Regression Internal compiler error in lambda benjamin.freist at hexagon dot com
2020-10-26 14:59 ` [Bug c++/97582] [9/10/11 Regression] ICE tree check: expected function_type or method_type, have error_mark in add_function_candidate, at cp/call.c:2146 since r9-6405-gbddee796d0b4800b marxin at gcc dot gnu.org
2021-01-14  9:31 ` rguenth at gcc dot gnu.org
2021-02-02  5:23 ` ppalka at gcc dot gnu.org
2021-02-11 16:00 ` cvs-commit at gcc dot gnu.org
2021-02-11 16:01 ` [Bug c++/97582] [9/10 " ppalka at gcc dot gnu.org
2021-06-01  8:18 ` rguenth at gcc dot gnu.org
2022-05-27  9:43 ` [Bug c++/97582] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:42 ` jakub at gcc dot gnu.org
2023-07-07  9:10 ` rguenth 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).