public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/111160] New: ICE on assigning volatile through ternary operator
@ 2023-08-26 3:37 trinxery at firemail dot cc
2023-08-26 4:07 ` [Bug c++/111160] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: trinxery at firemail dot cc @ 2023-08-26 3:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111160
Bug ID: 111160
Summary: ICE on assigning volatile through ternary operator
Product: gcc
Version: 13.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: trinxery at firemail dot cc
Target Milestone: ---
Created attachment 55796
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55796&action=edit
-freport-bug
class TheClass {};
void the_func() {
TheClass x;
volatile TheClass y;
(false ? x : x) = y;
}
buggy.cxx: In function ‘void the_func()’:
buggy.cxx:6:21: internal compiler error: in stabilize_expr, at cp/tree.cc:5969
6 | (false ? x : x) = y;
| ^
0x9340a9 stabilize_expr(tree_node*, tree_node**)
../../src/gcc/cp/tree.cc:5969
...
I think this is descriptive enough.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/111160] [11/12/13/14 Regression] ICE on assigning volatile through ternary operator
2023-08-26 3:37 [Bug c++/111160] New: ICE on assigning volatile through ternary operator trinxery at firemail dot cc
@ 2023-08-26 4:07 ` pinskia at gcc dot gnu.org
2023-08-28 20:14 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-26 4:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111160
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.5
Last reconfirmed| |2023-08-26
Summary|ICE on assigning volatile |[11/12/13/14 Regression]
|through ternary operator |ICE on assigning volatile
| |through ternary operator
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Known to work| |5.1.0
Known to fail| |6.1.0
Keywords| |ice-on-invalid-code
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC 5.1.0 and before for C++11:
<source>: In function 'void the_func()':
<source>:6:19: error: ambiguous overload for 'operator=' (operand types are
'TheClass' and 'volatile TheClass')
(false ? x : x) = y;
^
<source>:2:8: note: candidate: TheClass& TheClass::operator=(const TheClass&)
<near match>
struct TheClass {};
^
<source>:2:8: note: conversion of argument 1 would be ill-formed:
<source>:6:19: error: binding 'volatile TheClass' to reference of type 'const
TheClass&' discards qualifiers
(false ? x : x) = y;
^
<source>:2:8: note: candidate: TheClass& TheClass::operator=(TheClass&&) <near
match>
struct TheClass {};
^
<source>:2:8: note: conversion of argument 1 would be ill-formed:
<source>:6:19: error: cannot bind 'volatile TheClass' lvalue to 'TheClass&&'
(false ? x : x) = y;
^
For C++98:
<source>: In function 'void the_func()':
<source>:6:19: error: binding 'volatile TheClass' to reference of type 'const
TheClass&' discards qualifiers
(false ? x : x) = y;
^
<source>:2:8: note: initializing argument 1 of 'TheClass&
TheClass::operator=(const TheClass&)'
struct TheClass {};
^
Confirmed. this is invalid code.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/111160] [11/12/13/14 Regression] ICE on assigning volatile through ternary operator
2023-08-26 3:37 [Bug c++/111160] New: ICE on assigning volatile through ternary operator trinxery at firemail dot cc
2023-08-26 4:07 ` [Bug c++/111160] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
@ 2023-08-28 20:14 ` mpolacek at gcc dot gnu.org
2024-03-07 23:23 ` law at gcc dot gnu.org
2024-03-12 13:25 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-08-28 20:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111160
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r6-4886:
commit cda0a029f45d20f4535dcacf6c3194352c31e736
Author: Jason Merrill <jason@gcc.gnu.org>
Date: Fri Nov 13 19:08:05 2015 -0500
Merge C++ delayed folding branch.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/111160] [11/12/13/14 Regression] ICE on assigning volatile through ternary operator
2023-08-26 3:37 [Bug c++/111160] New: ICE on assigning volatile through ternary operator trinxery at firemail dot cc
2023-08-26 4:07 ` [Bug c++/111160] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
2023-08-28 20:14 ` mpolacek at gcc dot gnu.org
@ 2024-03-07 23:23 ` law at gcc dot gnu.org
2024-03-12 13:25 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-07 23:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111160
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
CC| |law at gcc dot gnu.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/111160] [11/12/13/14 Regression] ICE on assigning volatile through ternary operator
2023-08-26 3:37 [Bug c++/111160] New: ICE on assigning volatile through ternary operator trinxery at firemail dot cc
` (2 preceding siblings ...)
2024-03-07 23:23 ` law at gcc dot gnu.org
@ 2024-03-12 13:25 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-03-12 13:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111160
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Priority|P1 |P2
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 6-13 has been released with this bug, so P2.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-12 13:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-26 3:37 [Bug c++/111160] New: ICE on assigning volatile through ternary operator trinxery at firemail dot cc
2023-08-26 4:07 ` [Bug c++/111160] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
2023-08-28 20:14 ` mpolacek at gcc dot gnu.org
2024-03-07 23:23 ` law at gcc dot gnu.org
2024-03-12 13:25 ` jakub 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).