public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38705] New: ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
@ 2009-01-02 16:47 sdirkse at gams dot com
2009-01-02 16:50 ` [Bug c++/38705] " sdirkse at gams dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: sdirkse at gams dot com @ 2009-01-02 16:47 UTC (permalink / raw)
To: gcc-bugs
I turfed up an ICE with optimization, but the thing compiled fine without. To
reproduce, use the soon-to-be attached source and do:
madison.gams.com:/home/steve/lang/cpp/alpsBug$g++ -c AlpsTreeNode.ii
madison.gams.com:/home/steve/lang/cpp/alpsBug$g++ -O3 -c AlpsTreeNode.ii
AlpsTreeNode.cpp: In member function 'AlpsReturnStatus
AlpsTreeNode::encodeAlps(AlpsEncoded*) const':
AlpsTreeNode.cpp:144: internal compiler error: canonical types differ for
identical types const int and const AlpsNodeIndex_t
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
I was using the trunk src at rev 142984:
$gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr/local2
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.4.0 20081231 (experimental) (GCC)
--
Summary: ICE: canonical types differ for identical types const
int and const AlpsNodeIndex_t
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sdirkse at gams dot com
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38705
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38705] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
2009-01-02 16:47 [Bug c++/38705] New: ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t sdirkse at gams dot com
@ 2009-01-02 16:50 ` sdirkse at gams dot com
2009-01-02 17:30 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: sdirkse at gams dot com @ 2009-01-02 16:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from sdirkse at gams dot com 2009-01-02 16:49 -------
Created an attachment (id=17023)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17023&action=view)
test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38705
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38705] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
2009-01-02 16:47 [Bug c++/38705] New: ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t sdirkse at gams dot com
2009-01-02 16:50 ` [Bug c++/38705] " sdirkse at gams dot com
@ 2009-01-02 17:30 ` pinskia at gcc dot gnu dot org
2009-01-02 18:39 ` [Bug c++/38705] [4.4 Regression] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-02 17:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2009-01-02 17:29 -------
Reducing ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38705
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38705] [4.4 Regression] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
2009-01-02 16:47 [Bug c++/38705] New: ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t sdirkse at gams dot com
2009-01-02 16:50 ` [Bug c++/38705] " sdirkse at gams dot com
2009-01-02 17:30 ` pinskia at gcc dot gnu dot org
@ 2009-01-02 18:39 ` pinskia at gcc dot gnu dot org
2009-01-02 20:17 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-02 18:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2009-01-02 18:38 -------
Reduced testcase:
typedef int AlpsNodeIndex_t;
void writeRep(char* representation_, const int len) {
__builtin_memcpy(representation_ , &len, sizeof(int));
}
struct AlpsTreeNode
{
AlpsNodeIndex_t index_;
int explicit_;
int encodeAlps() const;
template <class T> void writeRep(const T& value) const { }
};
int AlpsTreeNode:: encodeAlps() const
{
writeRep(explicit_);
writeRep(index_);
}
--- CUT ---
I think this might have something to do with the __builtin_memcpy optimization.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC target triplet|x86_64-unknown-linux-gnu |
Keywords| |ice-checking, ice-on-valid-
| |code
Last reconfirmed|0000-00-00 00:00:00 |2009-01-02 18:38:20
date| |
Summary|ICE: canonical types differ |[4.4 Regression] ICE:
|for identical types const |canonical types differ for
|int and const |identical types const int
|AlpsNodeIndex_t |and const AlpsNodeIndex_t
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38705
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38705] [4.4 Regression] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
2009-01-02 16:47 [Bug c++/38705] New: ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t sdirkse at gams dot com
` (2 preceding siblings ...)
2009-01-02 18:39 ` [Bug c++/38705] [4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2009-01-02 20:17 ` jakub at gcc dot gnu dot org
2009-01-03 0:57 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-02 20:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2009-01-02 20:09 -------
Testing a fix.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2009-01-02 18:38:20 |2009-01-02 20:09:12
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38705
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38705] [4.4 Regression] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
2009-01-02 16:47 [Bug c++/38705] New: ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t sdirkse at gams dot com
` (3 preceding siblings ...)
2009-01-02 20:17 ` jakub at gcc dot gnu dot org
@ 2009-01-03 0:57 ` jakub at gcc dot gnu dot org
2009-01-03 1:03 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-03 0:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2009-01-03 00:56 -------
Subject: Bug 38705
Author: jakub
Date: Sat Jan 3 00:54:40 2009
New Revision: 143029
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143029
Log:
PR c++/38705
* builtins.c (fold_builtin_memory_op): Give up if either operand
is volatile. Set srctype or desttype to non-qualified version
of the other type.
* g++.dg/torture/pr38705.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr38705.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38705
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38705] [4.4 Regression] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
2009-01-02 16:47 [Bug c++/38705] New: ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t sdirkse at gams dot com
` (4 preceding siblings ...)
2009-01-03 0:57 ` jakub at gcc dot gnu dot org
@ 2009-01-03 1:03 ` jakub at gcc dot gnu dot org
2009-01-03 10:26 ` steven at gcc dot gnu dot org
2009-01-03 11:29 ` jakub at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-03 1:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2009-01-03 00:56 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38705
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38705] [4.4 Regression] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
2009-01-02 16:47 [Bug c++/38705] New: ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t sdirkse at gams dot com
` (5 preceding siblings ...)
2009-01-03 1:03 ` jakub at gcc dot gnu dot org
@ 2009-01-03 10:26 ` steven at gcc dot gnu dot org
2009-01-03 11:29 ` jakub at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-01-03 10:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from steven at gcc dot gnu dot org 2009-01-03 10:24 -------
Reviewer said: "So, this is ok with or without the volatile restriction." (see
http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00070.html). The committed patch
still seems to have this restriction...?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38705
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38705] [4.4 Regression] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
2009-01-02 16:47 [Bug c++/38705] New: ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t sdirkse at gams dot com
` (6 preceding siblings ...)
2009-01-03 10:26 ` steven at gcc dot gnu dot org
@ 2009-01-03 11:29 ` jakub at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-03 11:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2009-01-03 11:28 -------
Yes. Just removing the restriction is wrong, because then volatile from the
wrong side of the copy would be used. So extra code would be needed to handle
that, and I really don't think it is worth it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38705
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-01-03 11:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-02 16:47 [Bug c++/38705] New: ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t sdirkse at gams dot com
2009-01-02 16:50 ` [Bug c++/38705] " sdirkse at gams dot com
2009-01-02 17:30 ` pinskia at gcc dot gnu dot org
2009-01-02 18:39 ` [Bug c++/38705] [4.4 Regression] " pinskia at gcc dot gnu dot org
2009-01-02 20:17 ` jakub at gcc dot gnu dot org
2009-01-03 0:57 ` jakub at gcc dot gnu dot org
2009-01-03 1:03 ` jakub at gcc dot gnu dot org
2009-01-03 10:26 ` steven at gcc dot gnu dot org
2009-01-03 11:29 ` jakub at gcc dot gnu 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).