public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96008] New: cpp1y/lambda-generic-69078-1.C nonnull warning and ICE
@ 2020-06-30 16:56 dje at gcc dot gnu.org
  2020-06-30 16:56 ` [Bug c++/96008] " dje at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dje at gcc dot gnu.org @ 2020-06-30 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96008
           Summary: cpp1y/lambda-generic-69078-1.C nonnull warning and ICE
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dje at gcc dot gnu.org
  Target Milestone: ---

With the recent -Wnonnull changes, cpp1y/lambda-generic-69078-1.C now elicits a
warning and the compiler ICEs.

FAIL: g++.dg/cpp1y/lambda-generic-69078-1.C  -std=gnu++14 (test for excess
errors)
Excess errors:
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/cpp1y/lambda-generic-69078-1.C:23:13:
warning: 'this' pointer null [-Wnonnull]
'
Internal compiler error: Error reporting routines re-entered.
ranges offset out of range


In discussion on IRC, Jonathan Wakely suggested that this is a C++FE bug
because a lambda expression can't have a null this pointer.

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

* [Bug c++/96008] cpp1y/lambda-generic-69078-1.C nonnull warning and ICE
  2020-06-30 16:56 [Bug c++/96008] New: cpp1y/lambda-generic-69078-1.C nonnull warning and ICE dje at gcc dot gnu.org
@ 2020-06-30 16:56 ` dje at gcc dot gnu.org
  2020-06-30 17:57 ` msebor at gcc dot gnu.org
  2020-06-30 17:59 ` dje at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dje at gcc dot gnu.org @ 2020-06-30 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

David Edelsohn <dje at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-06-30
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from David Edelsohn <dje at gcc dot gnu.org> ---
Confirmed.

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

* [Bug c++/96008] cpp1y/lambda-generic-69078-1.C nonnull warning and ICE
  2020-06-30 16:56 [Bug c++/96008] New: cpp1y/lambda-generic-69078-1.C nonnull warning and ICE dje at gcc dot gnu.org
  2020-06-30 16:56 ` [Bug c++/96008] " dje at gcc dot gnu.org
@ 2020-06-30 17:57 ` msebor at gcc dot gnu.org
  2020-06-30 17:59 ` dje at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-06-30 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
This is a duplicate of 95984.

*** This bug has been marked as a duplicate of bug 95984 ***

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

* [Bug c++/96008] cpp1y/lambda-generic-69078-1.C nonnull warning and ICE
  2020-06-30 16:56 [Bug c++/96008] New: cpp1y/lambda-generic-69078-1.C nonnull warning and ICE dje at gcc dot gnu.org
  2020-06-30 16:56 ` [Bug c++/96008] " dje at gcc dot gnu.org
  2020-06-30 17:57 ` msebor at gcc dot gnu.org
@ 2020-06-30 17:59 ` dje at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dje at gcc dot gnu.org @ 2020-06-30 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from David Edelsohn <dje at gcc dot gnu.org> ---
msebor:
the warning is working correctly but the IL the C++ front end
emits doesn't look right: AFAICS, it creates a function object
for the lambda and calls its operator() with a null this pointer:

; Function static decltype (((const main()::<lambda(auto:1
...)>*)0)->operator()<auto:1
...>(static_cast<auto:1&&>(main::._anon_0::_FUN::<unnamed>) ...))
main()::<lambda(auto:1 ...)>::_FUN(auto:1 ...) [with auto:1 = {int};
decltype (((const main()::<lambda(auto:1 ...)>*)0)->operator()<auto:1
...>(static_cast<auto:1&&>(main::._anon_0::_FUN::<unnamed>) ...)) =
void] (null)
;; enabled by -tree-original


<<cleanup_point <<< Unknown tree: expr_stmt
   main()::<lambda(auto:1 ...)>::operator()<int> (0B, D.2440) >>>>>;
return;


The ICE is PR95984

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

end of thread, other threads:[~2020-06-30 17:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 16:56 [Bug c++/96008] New: cpp1y/lambda-generic-69078-1.C nonnull warning and ICE dje at gcc dot gnu.org
2020-06-30 16:56 ` [Bug c++/96008] " dje at gcc dot gnu.org
2020-06-30 17:57 ` msebor at gcc dot gnu.org
2020-06-30 17:59 ` dje 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).