public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..."
@ 2004-06-30 11:43 kai dot ludwig at uni-tuebingen dot de
2004-06-30 11:44 ` [Bug c++/16295] " kai dot ludwig at uni-tuebingen dot de
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: kai dot ludwig at uni-tuebingen dot de @ 2004-06-30 11:43 UTC (permalink / raw)
To: gcc-bugs
g++-3.3.3 aborts with message
"sorry, unimplemented: `tree_vec' not supported by dump_expr"
when compiling WITHOUT -pedantic or -pedantic-errors flags.
WITH these flags it compiles without complaint.
--
Summary: -pedantic option resolves compiler error "sorry,
unimplemented: ..."
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kai dot ludwig at uni-tuebingen dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
@ 2004-06-30 11:44 ` kai dot ludwig at uni-tuebingen dot de
2004-06-30 11:46 ` kai dot ludwig at uni-tuebingen dot de
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kai dot ludwig at uni-tuebingen dot de @ 2004-06-30 11:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kai dot ludwig at uni-tuebingen dot de 2004-06-30 11:43 -------
Created an attachment (id=6660)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6660&action=view)
preprocessed file compiled without -pedantic flag : fails
generated by:
g++ -I. -I/usr/local/include/loki -I/home/kl/software/src/quantity/Quantities
-I/home/kl/software/src/quantity/BSUtilities -v -save-temps -Wall -Werror
main.cpp -L/home/kl/software/lib -lPhysicalQuantities -lQuantity -lBSUtilities
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
2004-06-30 11:44 ` [Bug c++/16295] " kai dot ludwig at uni-tuebingen dot de
@ 2004-06-30 11:46 ` kai dot ludwig at uni-tuebingen dot de
2004-06-30 11:51 ` kai dot ludwig at uni-tuebingen dot de
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kai dot ludwig at uni-tuebingen dot de @ 2004-06-30 11:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kai dot ludwig at uni-tuebingen dot de 2004-06-30 11:44 -------
Created an attachment (id=6661)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6661&action=view)
preprocessed file compiled with -pedantic flag: succeeded
generated by
g++ -I. -I/usr/local/include/loki -I/home/kl/software/src/quantity/Quantities
-I/home/kl/software/src/quantity/BSUtilities -v -save-temps -Wall -Werror
-pedantic main.cpp -L/home/kl/software/lib -lPhysicalQuantities -lQuantity
-lBSUtilities
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
2004-06-30 11:44 ` [Bug c++/16295] " kai dot ludwig at uni-tuebingen dot de
2004-06-30 11:46 ` kai dot ludwig at uni-tuebingen dot de
@ 2004-06-30 11:51 ` kai dot ludwig at uni-tuebingen dot de
2004-06-30 12:16 ` kai dot ludwig at uni-tuebingen dot de
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kai dot ludwig at uni-tuebingen dot de @ 2004-06-30 11:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kai dot ludwig at uni-tuebingen dot de 2004-06-30 11:46 -------
Created an attachment (id=6662)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6662&action=view)
can't compile this main routine without -pedantic flag
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
` (2 preceding siblings ...)
2004-06-30 11:51 ` kai dot ludwig at uni-tuebingen dot de
@ 2004-06-30 12:16 ` kai dot ludwig at uni-tuebingen dot de
2004-06-30 14:39 ` bangerth at dealii dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kai dot ludwig at uni-tuebingen dot de @ 2004-06-30 12:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kai dot ludwig at uni-tuebingen dot de 2004-06-30 11:56 -------
(In reply to comment #0)
> g++-3.3.3 aborts with message
>
> "sorry, unimplemented: `tree_vec' not supported by dump_expr"
>
> when compiling WITHOUT -pedantic or -pedantic-errors flags.
> WITH these flags it compiles without complaint.
My environment:
SuSE Linux 9.1 with included GNU compiler collection
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
` (3 preceding siblings ...)
2004-06-30 12:16 ` kai dot ludwig at uni-tuebingen dot de
@ 2004-06-30 14:39 ` bangerth at dealii dot org
2004-06-30 14:55 ` bangerth at dealii dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2004-06-30 14:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-06-30 14:30 -------
Confirmed. The two preprocessed source files are actually identitical.
I get this here:
g/x> /home/bangerth/bin/gcc-3.3.4-pre/bin/c++ -c w.ii
In file included
from /home/kl/software/src/quantity/Quantities/PhysicalQuantiti
es/Acceleration.h:27,
from /home/kl/software/src/quantity/Quantities/PhysicalQuantiti
es/PhysicalQuantities.h:28,
from main.cpp:1:
/home/kl/software/src/quantity/Quantities/Quantity/Variable.h:865: internal
comp
iler error: tree
check: expected tree_list, have tree_vec in dump_decl, at cp/error.c:978
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
g/x> /home/bangerth/bin/gcc-3.3.4-pre/bin/c++ -c w.ii -pedantic
It is indeed strange that the code should compile with -pedantic, but
not otherwise. Note that the different message I get is likely due to
the fact that I configured with --enable-checking.
I'll try to come up with a smaller example.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-06-30 14:30:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
` (4 preceding siblings ...)
2004-06-30 14:39 ` bangerth at dealii dot org
@ 2004-06-30 14:55 ` bangerth at dealii dot org
2004-06-30 15:04 ` bangerth at dealii dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2004-06-30 14:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-06-30 14:41 -------
One note: the code is actually invalid. We crash on the line
typedef NonPrefixable<GenericClass<AddT>, GenericUnit, DT> AddU;
but NonPrefixable really only takes two template arguments, not three.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
` (5 preceding siblings ...)
2004-06-30 14:55 ` bangerth at dealii dot org
@ 2004-06-30 15:04 ` bangerth at dealii dot org
2004-06-30 15:07 ` bangerth at dealii dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2004-06-30 15:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-06-30 15:00 -------
OK, here's something small:
----------------
template <typename> struct O {
template <typename> struct I {
struct II {};
};
};
template <typename T> struct X {
typedef typename O<T>::I<int>::II type1;
typedef O<type1> type2;
};
----------------------
It still crashes with -pedantic, so something is different. Note that
the crash also goes away if I fix the code: one has to write
typedef typename O<T>::template I<int>::II type1;
However, this is fixed in 3.4 and mainline, where we get an error message
about this, rather than an ICE.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
` (6 preceding siblings ...)
2004-06-30 15:04 ` bangerth at dealii dot org
@ 2004-06-30 15:07 ` bangerth at dealii dot org
2004-06-30 20:50 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2004-06-30 15:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-06-30 15:04 -------
And as a last note: If I fix the code like so:
template<template<class, class> class Q1, class GT1, class Head1,
class Tail1, class DU1, class U1,
template<class, class> class Q2, class GT2, class Head2,
class Tail2, class DU2, class U2, class DT>
struct GenerateVariable
<Q1<Quantity<GT1, Typelist<Head1, Tail1>, DU1, DT>, U1>,
Q2<Quantity<GT2, Typelist<Head2, Tail2>, DU2, DT>, U2> >
{
private:
typedef typename Dimension<GT1>::template Add<Dimension<GT2> >::Class
AddT;
typedef NonPrefixable<GenericClass<AddT>, GenericUnit> AddU;
//...
};
then it compiles cleanly. Note that the 'template' keyword in the declaration
of AddT is necessary. I removed the erroneous third template parameter
in the declaration of AddU, but I have of course no clue what you originally
intended there.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
` (7 preceding siblings ...)
2004-06-30 15:07 ` bangerth at dealii dot org
@ 2004-06-30 20:50 ` pinskia at gcc dot gnu dot org
2004-07-01 11:30 ` bernd dot speiser at uni-tuebingen dot de
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-30 20:50 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
` (8 preceding siblings ...)
2004-06-30 20:50 ` pinskia at gcc dot gnu dot org
@ 2004-07-01 11:30 ` bernd dot speiser at uni-tuebingen dot de
2004-07-01 13:23 ` kai dot ludwig at uni-tuebingen dot de
2004-07-01 14:22 ` bangerth at dealii dot org
11 siblings, 0 replies; 13+ messages in thread
From: bernd dot speiser at uni-tuebingen dot de @ 2004-07-01 11:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bernd dot speiser at uni-tuebingen dot de 2004-07-01 11:30 -------
(In reply to comment #8)
I'm the original writer of this code, so I'll comment on the third parameter.
> And as a last note: If I fix the code like so:
>
> template<template<class, class> class Q1, class GT1, class Head1,
> class Tail1, class DU1, class U1,
> template<class, class> class Q2, class GT2, class Head2,
> class Tail2, class DU2, class U2, class DT>
> struct GenerateVariable
> <Q1<Quantity<GT1, Typelist<Head1, Tail1>, DU1, DT>, U1>,
> Q2<Quantity<GT2, Typelist<Head2, Tail2>, DU2, DT>, U2> >
> {
> private:
>
> typedef typename Dimension<GT1>::template Add<Dimension<GT2> >::Class
> AddT;
> typedef NonPrefixable<GenericClass<AddT>, GenericUnit> AddU;
> //...
> };
>
> then it compiles cleanly. Note that the 'template' keyword in the declaration
> of AddT is necessary. I removed the erroneous third template parameter
> in the declaration of AddU, but I have of course no clue what you originally
> intended there.
NonPrefixable really takes THREE parameters, with DT being the last one and
having a default value of double. Thus, if you leave it off, as in this example,
then the last parameter to NonPrefixable is just taken as double.
I understand that 3.4 handles the missing `template' keyword now correctly, right?
We'll test this, and report back what we find.
Still, the question remains, why the -pedantic flag results in NOT crashing??
Bernd
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
` (9 preceding siblings ...)
2004-07-01 11:30 ` bernd dot speiser at uni-tuebingen dot de
@ 2004-07-01 13:23 ` kai dot ludwig at uni-tuebingen dot de
2004-07-01 14:22 ` bangerth at dealii dot org
11 siblings, 0 replies; 13+ messages in thread
From: kai dot ludwig at uni-tuebingen dot de @ 2004-07-01 13:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kai dot ludwig at uni-tuebingen dot de 2004-07-01 13:23 -------
(In reply to comment #7)
> OK, here's something small:
> ----------------
> template <typename> struct O {
> template <typename> struct I {
> struct II {};
> };
> };
>
> template <typename T> struct X {
> typedef typename O<T>::I<int>::II type1;
> typedef O<type1> type2;
> };
> ----------------------
> It still crashes with -pedantic, so something is different. Note that
> the crash also goes away if I fix the code: one has to write
> typedef typename O<T>::template I<int>::II type1;
>
> However, this is fixed in 3.4 and mainline, where we get an error message
> about this, rather than an ICE.
Indeed that's it. After introducing the 'template' keyword as mentioned above
into the Variable.h source, g++-3.3.3 works as expected.
Thank you Wolfgang,
Kai
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
` (10 preceding siblings ...)
2004-07-01 13:23 ` kai dot ludwig at uni-tuebingen dot de
@ 2004-07-01 14:22 ` bangerth at dealii dot org
11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2004-07-01 14:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-01 14:22 -------
> Still, the question remains, why the -pedantic flag results in NOT
> crashing??
I have no clue, but since this case was fixed already, it's hard to tell.
One could go about and try to find a _small_ testcase for 3.3.x in
which it ICEs unless we give -pedantic. Then we could figure out what
is happening there and and see if the same patch could also be
applied to mainline. However, since development generally only happens
on mainline, I doubt that anyway has the energy to do things like this.
Let's just wait until we get a similar bug against mainline, and then
reconsider whether we need to do the necessary investigations.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16295
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2004-07-01 14:22 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-30 11:43 [Bug c++/16295] New: -pedantic option resolves compiler error "sorry, unimplemented: ..." kai dot ludwig at uni-tuebingen dot de
2004-06-30 11:44 ` [Bug c++/16295] " kai dot ludwig at uni-tuebingen dot de
2004-06-30 11:46 ` kai dot ludwig at uni-tuebingen dot de
2004-06-30 11:51 ` kai dot ludwig at uni-tuebingen dot de
2004-06-30 12:16 ` kai dot ludwig at uni-tuebingen dot de
2004-06-30 14:39 ` bangerth at dealii dot org
2004-06-30 14:55 ` bangerth at dealii dot org
2004-06-30 15:04 ` bangerth at dealii dot org
2004-06-30 15:07 ` bangerth at dealii dot org
2004-06-30 20:50 ` pinskia at gcc dot gnu dot org
2004-07-01 11:30 ` bernd dot speiser at uni-tuebingen dot de
2004-07-01 13:23 ` kai dot ludwig at uni-tuebingen dot de
2004-07-01 14:22 ` bangerth at dealii dot 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).