public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48015] New: ICE: unexpected expression 'std::min' of kind overload
@ 2011-03-07 13:59 schnetter at gmail dot com
2011-03-07 15:04 ` [Bug c++/48015] " rguenth at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: schnetter at gmail dot com @ 2011-03-07 13:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48015
Summary: ICE: unexpected expression 'std::min' of kind overload
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: schnetter@gmail.com
Created attachment 23568
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23568
bzipp2d preprocessed source code
Using gcc version:
$ g++-mp-4.6 --version
g++-mp-4.6 (GCC) 4.6.0 20110305 (experimental)
I execute the command:
$ g++-mp-4.6 -fopenmp -Wall -g3 -m128bit-long-double -march=native -std=gnu++0x
-fbounds-check -fstack-protector-all -ftrapv -O0 -fopenmp -Wall -Wshadow
-Wpointer-arith -Wcast-qual -Wcast-align -Woverloaded-virtual -c data.ii
and receive the error message:
/Users/eschnett/EinsteinToolkit-hg/arrangements/Carpet/CarpetLib/src/data.cc:
In function 'void call_operator(void (*)(const T*, const ivect3&, T*, const
ivect3&, const ibbox3&, const ibbox3&, const ibbox3&), const T*, const ivect3&,
T*, const ivect3&, const ibbox3&, const ibbox3&, const ibbox3&)':
/Users/eschnett/EinsteinToolkit-hg/arrangements/Carpet/CarpetLib/src/data.cc:80:56:
internal compiler error: unexpected expression 'std::min' of kind overload
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
The same code compiles fine with g++ 4.5.2.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/48015] ICE: unexpected expression 'std::min' of kind overload
2011-03-07 13:59 [Bug c++/48015] New: ICE: unexpected expression 'std::min' of kind overload schnetter at gmail dot com
@ 2011-03-07 15:04 ` rguenth at gcc dot gnu.org
2011-03-07 15:14 ` schnetter at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-07 15:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48015
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.03.07 15:03:42
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-07 15:03:42 UTC ---
Confirmed. Unclear if this is a regression or not, the testcase doesn't
build with 4.5.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/48015] ICE: unexpected expression 'std::min' of kind overload
2011-03-07 13:59 [Bug c++/48015] New: ICE: unexpected expression 'std::min' of kind overload schnetter at gmail dot com
2011-03-07 15:04 ` [Bug c++/48015] " rguenth at gcc dot gnu.org
@ 2011-03-07 15:14 ` schnetter at gmail dot com
2011-03-07 15:16 ` [Bug c++/48015] [4.6 Regression] [C++0x] " redi at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: schnetter at gmail dot com @ 2011-03-07 15:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48015
--- Comment #2 from Erik Schnetter <schnetter at gmail dot com> 2011-03-07 15:14:00 UTC ---
Created attachment 23570
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23570
Same source code preprocessed with gcc 4.5.2
If I use gcc 4.5.2:
$ g++-mp-4.5 --version
g++-mp-4.5 (GCC) 4.5.2
things work fine. I added an attachment containing the same original source
code preprocessed with gcc 4.5.2 (as "data-gcc45.ii.bz2"). If I compile this
preprocessed source code with:
$ g++-mp-4.5 -fopenmp -Wall -g3 -m128bit-long-double -march=native -std=gnu++0x
-fbounds-check -fstack-protector-all -ftrapv -O0 -fopenmp -Wall -Wshadow
-Wpointer-arith -Wcast-qual -Wcast-align -Woverloaded-virtual -c data-gcc45.ii
I see no screen output, and the object file is produced fine.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/48015] [4.6 Regression] [C++0x] ICE: unexpected expression 'std::min' of kind overload
2011-03-07 13:59 [Bug c++/48015] New: ICE: unexpected expression 'std::min' of kind overload schnetter at gmail dot com
2011-03-07 15:04 ` [Bug c++/48015] " rguenth at gcc dot gnu.org
2011-03-07 15:14 ` schnetter at gmail dot com
@ 2011-03-07 15:16 ` redi at gcc dot gnu.org
2011-03-07 15:18 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2011-03-07 15:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48015
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE: unexpected expression |[4.6 Regression] [C++0x]
|'std::min' of kind overload |ICE: unexpected expression
| |'std::min' of kind overload
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-07 15:16:10 UTC ---
reduced form below shows it's a regression since 4.5, only an ICE with C++0x -
appears to be due to C++0x constexpr support
namespace std
{
template<typename T>
T min(const T& l, const T& r)
{
return l < r ? l : r;
}
}
using namespace std;
int f();
void g(const int&);
template <typename T>
static
void
call_operator ( )
{
int const a = f();
int const b = f();
int const c = min (a, b);
g (c - 0); // ICE
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/48015] [4.6 Regression] [C++0x] ICE: unexpected expression 'std::min' of kind overload
2011-03-07 13:59 [Bug c++/48015] New: ICE: unexpected expression 'std::min' of kind overload schnetter at gmail dot com
` (2 preceding siblings ...)
2011-03-07 15:16 ` [Bug c++/48015] [4.6 Regression] [C++0x] " redi at gcc dot gnu.org
@ 2011-03-07 15:18 ` rguenth at gcc dot gnu.org
2011-03-07 19:00 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-07 15:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48015
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Priority|P3 |P1
Target Milestone|--- |4.6.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/48015] [4.6 Regression] [C++0x] ICE: unexpected expression 'std::min' of kind overload
2011-03-07 13:59 [Bug c++/48015] New: ICE: unexpected expression 'std::min' of kind overload schnetter at gmail dot com
` (3 preceding siblings ...)
2011-03-07 15:18 ` rguenth at gcc dot gnu.org
@ 2011-03-07 19:00 ` jakub at gcc dot gnu.org
2011-03-07 20:32 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-07 19:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48015
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-07 19:00:15 UTC ---
Started failing with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170488
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/48015] [4.6 Regression] [C++0x] ICE: unexpected expression 'std::min' of kind overload
2011-03-07 13:59 [Bug c++/48015] New: ICE: unexpected expression 'std::min' of kind overload schnetter at gmail dot com
` (4 preceding siblings ...)
2011-03-07 19:00 ` jakub at gcc dot gnu.org
@ 2011-03-07 20:32 ` jason at gcc dot gnu.org
2011-03-08 5:28 ` jason at gcc dot gnu.org
2011-03-08 7:27 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-07 20:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48015
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-07 20:32:35 UTC ---
Mine.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/48015] [4.6 Regression] [C++0x] ICE: unexpected expression 'std::min' of kind overload
2011-03-07 13:59 [Bug c++/48015] New: ICE: unexpected expression 'std::min' of kind overload schnetter at gmail dot com
` (5 preceding siblings ...)
2011-03-07 20:32 ` jason at gcc dot gnu.org
@ 2011-03-08 5:28 ` jason at gcc dot gnu.org
2011-03-08 7:27 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-08 5:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48015
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-08 05:28:07 UTC ---
Author: jason
Date: Tue Mar 8 05:28:02 2011
New Revision: 170770
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170770
Log:
PR c++/48015
* init.c (constant_value_1): Always require init to be TREE_CONSTANT.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/init.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/48015] [4.6 Regression] [C++0x] ICE: unexpected expression 'std::min' of kind overload
2011-03-07 13:59 [Bug c++/48015] New: ICE: unexpected expression 'std::min' of kind overload schnetter at gmail dot com
` (6 preceding siblings ...)
2011-03-08 5:28 ` jason at gcc dot gnu.org
@ 2011-03-08 7:27 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-08 7:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48015
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-08 07:26:50 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-03-08 7:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-07 13:59 [Bug c++/48015] New: ICE: unexpected expression 'std::min' of kind overload schnetter at gmail dot com
2011-03-07 15:04 ` [Bug c++/48015] " rguenth at gcc dot gnu.org
2011-03-07 15:14 ` schnetter at gmail dot com
2011-03-07 15:16 ` [Bug c++/48015] [4.6 Regression] [C++0x] " redi at gcc dot gnu.org
2011-03-07 15:18 ` rguenth at gcc dot gnu.org
2011-03-07 19:00 ` jakub at gcc dot gnu.org
2011-03-07 20:32 ` jason at gcc dot gnu.org
2011-03-08 5:28 ` jason at gcc dot gnu.org
2011-03-08 7:27 ` 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).