public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56438] New: [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551
@ 2013-02-24 23:56 manisandro at gmail dot com
2013-02-25 8:10 ` [Bug c++/56438] " jakub at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: manisandro at gmail dot com @ 2013-02-24 23:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56438
Bug #: 56438
Summary: [4.8 regression] ICE in value_dependent_expression_p,
at cp/pt.c:19551
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: manisandro@gmail.com
gcc version 4.8.0 20130220 (Red Hat 4.8.0-0.14) (GCC)
g++ -c ice.cc
ice.cc: In function ‘void foo()’:
ice.cc:19:25: internal compiler error: in value_dependent_expression_p, at
cp/pt.c:19551
a << bar(b.size(), C());
^
========== ice.cc ==========
struct A { };
A& operator<<(A&, const char*);
struct B {
int size();
};
struct C { };
template <class S, class T>
S bar(const S& s, const T& t) {
return s;
}
template<class S, class T>
void foo() {
A a;
B b;
a << bar(b.size(), C());
}
===========================
gcc version 4.7.2 20121109 (Red Hat 4.7.2-9) (GCC), gives get the expected
result
g++ -c ice.cc
ice.cc: In function ‘void foo()’:
ice.cc:19:25: error: no match for ‘operator<<’ in ‘a << bar(b.B::size(), C())’
ice.cc:19:25: note: candidate is:
ice.cc:2:4: note: A& operator<<(A&, const char*) <near match>
ice.cc:2:4: note: no known conversion for argument 2 from ‘int’ to ‘const
char*’
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56438] [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551
2013-02-24 23:56 [Bug c++/56438] New: [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551 manisandro at gmail dot com
@ 2013-02-25 8:10 ` jakub at gcc dot gnu.org
2013-02-25 8:17 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-25 8:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56438
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-02-25
CC| |jakub at gcc dot gnu.org
Target Milestone|--- |4.8.0
Ever Confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-25 08:09:41 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192141
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56438] [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551
2013-02-24 23:56 [Bug c++/56438] New: [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551 manisandro at gmail dot com
2013-02-25 8:10 ` [Bug c++/56438] " jakub at gcc dot gnu.org
@ 2013-02-25 8:17 ` jakub at gcc dot gnu.org
2013-02-26 4:28 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-25 8:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56438
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-25 08:17:04 UTC ---
It is the maybe_constant_value now called from C++98 mode of null_ptr_cst_p.
The ICE is on:
19551 /* If there are no operands, it must be an expression such
19552 as "int()". This should not happen for aggregate types
19553 because it would form non-constant expressions. */
19554 gcc_assert (cxx_dialect >= cxx0x
19555 || INTEGRAL_OR_ENUMERATION_TYPE_P (type));
As we now call maybe_constant_value even on what isn't known to be a constant
expression, can we drop this assertion, or set some flag in
maybe_constant_value to allow this and reset it back afterwards?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56438] [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551
2013-02-24 23:56 [Bug c++/56438] New: [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551 manisandro at gmail dot com
2013-02-25 8:10 ` [Bug c++/56438] " jakub at gcc dot gnu.org
2013-02-25 8:17 ` jakub at gcc dot gnu.org
@ 2013-02-26 4:28 ` jason at gcc dot gnu.org
2013-02-26 4:30 ` jason at gcc dot gnu.org
2014-03-01 9:58 ` trippels at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-26 4:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56438
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-26 04:27:49 UTC ---
Author: jason
Date: Tue Feb 26 04:27:40 2013
New Revision: 196274
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196274
Log:
PR c++/56438
* semantics.c (potential_constant_expression_1): In C++98, a cast
to non-integral type can't be a constant expression.
Added:
trunk/gcc/testsuite/g++.dg/template/cast3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56438] [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551
2013-02-24 23:56 [Bug c++/56438] New: [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551 manisandro at gmail dot com
` (2 preceding siblings ...)
2013-02-26 4:28 ` jason at gcc dot gnu.org
@ 2013-02-26 4:30 ` jason at gcc dot gnu.org
2014-03-01 9:58 ` trippels at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-26 4:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56438
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-26 04:29:51 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56438] [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551
2013-02-24 23:56 [Bug c++/56438] New: [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551 manisandro at gmail dot com
` (3 preceding siblings ...)
2013-02-26 4:30 ` jason at gcc dot gnu.org
@ 2014-03-01 9:58 ` trippels at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-03-01 9:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56438
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Sorry, wrong bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-03-01 9:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-24 23:56 [Bug c++/56438] New: [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551 manisandro at gmail dot com
2013-02-25 8:10 ` [Bug c++/56438] " jakub at gcc dot gnu.org
2013-02-25 8:17 ` jakub at gcc dot gnu.org
2013-02-26 4:28 ` jason at gcc dot gnu.org
2013-02-26 4:30 ` jason at gcc dot gnu.org
2014-03-01 9:58 ` trippels 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).