public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration
@ 2023-05-24 18:45 ed at catmur dot uk
2023-05-24 18:51 ` [Bug c++/109958] " mpolacek at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: ed at catmur dot uk @ 2023-05-24 18:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109958
Bug ID: 109958
Summary: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking
the address of bound static member function brought
into derived class by using-declaration
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ed at catmur dot uk
Target Milestone: ---
struct B { static int f(); };
struct D : B { using B::f; };
void f(D d) { &d.f; }
<source>: In function 'void f(D)':
<source>:3:18: error: ISO C++ forbids taking the address of a bound member
function to form a pointer to member function. Say '&D::f' [-fpermissive]
3 | void f(D d) { &d.f; }
| ~~^
<source>:3:18: internal compiler error: in build_ptrmem_type, at
cp/decl.cc:11066
3 | void f(D d) { &d.f; }
| ^
0x23a0cee internal_error(char const*, ...)
???:0
0xa95fae fancy_abort(char const*, int, char const*)
???:0
0xd31f7f build_x_unary_op(unsigned int, tree_code, cp_expr, tree_node*, int)
???:0
0xc7ab2f c_parse_file()
???:0
0xdb9519 c_common_parse_file()
???:0
This appears to have been broken somewhere between 4.7.4 and 4.8.1.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109958] ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration
2023-05-24 18:45 [Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration ed at catmur dot uk
@ 2023-05-24 18:51 ` mpolacek at gcc dot gnu.org
2023-05-24 19:06 ` [Bug c++/109958] [10/11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-05-24 18:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109958
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |mpolacek at gcc dot gnu.org
Last reconfirmed| |2023-05-24
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed. r0-115460-g57910f3a9a81e9:
commit 57910f3a9a81e9ad122a814255197f6f24c6af08
Author: Jason Merrill <jason@redhat.com>
Date: Sat Mar 3 19:53:30 2012 -0500
class.c (add_method): Always build an OVERLOAD for using-decls.
* class.c (add_method): Always build an OVERLOAD for using-decls.
* search.c (lookup_member): Handle getting an OVERLOAD for a
single function.
From-SVN: r184873
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109958] [10/11/12/13/14 Regression] ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration
2023-05-24 18:45 [Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration ed at catmur dot uk
2023-05-24 18:51 ` [Bug c++/109958] " mpolacek at gcc dot gnu.org
@ 2023-05-24 19:06 ` mpolacek at gcc dot gnu.org
2023-05-25 7:57 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-05-24 19:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109958
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Priority|P3 |P2
Summary|ICE: in build_ptrmem_type, |[10/11/12/13/14 Regression]
|at cp/decl.cc:11066 taking |ICE: in build_ptrmem_type,
|the address of bound static |at cp/decl.cc:11066 taking
|member function brought |the address of bound static
|into derived class by |member function brought
|using-declaration |into derived class by
| |using-declaration
Target Milestone|--- |10.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109958] [10/11/12/13/14 Regression] ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration
2023-05-24 18:45 [Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration ed at catmur dot uk
2023-05-24 18:51 ` [Bug c++/109958] " mpolacek at gcc dot gnu.org
2023-05-24 19:06 ` [Bug c++/109958] [10/11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
@ 2023-05-25 7:57 ` rguenth at gcc dot gnu.org
2023-05-25 10:46 ` ed at catmur dot uk
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-25 7:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109958
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
so is that invalid code?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109958] [10/11/12/13/14 Regression] ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration
2023-05-24 18:45 [Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration ed at catmur dot uk
` (2 preceding siblings ...)
2023-05-25 7:57 ` rguenth at gcc dot gnu.org
@ 2023-05-25 10:46 ` ed at catmur dot uk
2023-07-07 10:45 ` [Bug c++/109958] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-05-21 14:59 ` [Bug c++/109958] [11/12/13/14/15 " simartin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: ed at catmur dot uk @ 2023-05-25 10:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109958
--- Comment #3 from Ed Catmur <ed at catmur dot uk> ---
B::f is a static member function so yes, it's valid. A class member access
expression naming a static member function is an lvalue designating that
function, and it shouldn't make any difference that the function was found via
a using declaration.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109958] [11/12/13/14 Regression] ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration
2023-05-24 18:45 [Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration ed at catmur dot uk
` (3 preceding siblings ...)
2023-05-25 10:46 ` ed at catmur dot uk
@ 2023-07-07 10:45 ` rguenth at gcc dot gnu.org
2024-05-21 14:59 ` [Bug c++/109958] [11/12/13/14/15 " simartin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109958
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/109958] [11/12/13/14/15 Regression] ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration
2023-05-24 18:45 [Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration ed at catmur dot uk
` (4 preceding siblings ...)
2023-07-07 10:45 ` [Bug c++/109958] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2024-05-21 14:59 ` simartin at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: simartin at gcc dot gnu.org @ 2024-05-21 14:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109958
Simon Martin <simartin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |simartin at gcc dot gnu.org
--- Comment #5 from Simon Martin <simartin at gcc dot gnu.org> ---
Working on it
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-05-21 14:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 18:45 [Bug c++/109958] New: ICE: in build_ptrmem_type, at cp/decl.cc:11066 taking the address of bound static member function brought into derived class by using-declaration ed at catmur dot uk
2023-05-24 18:51 ` [Bug c++/109958] " mpolacek at gcc dot gnu.org
2023-05-24 19:06 ` [Bug c++/109958] [10/11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
2023-05-25 7:57 ` rguenth at gcc dot gnu.org
2023-05-25 10:46 ` ed at catmur dot uk
2023-07-07 10:45 ` [Bug c++/109958] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-05-21 14:59 ` [Bug c++/109958] [11/12/13/14/15 " simartin 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).