* [Bug c++/24362] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
@ 2005-10-14 11:49 ` worm at arrakis dot es
2005-10-14 11:50 ` [Bug middle-end/24362] " pinskia at gcc dot gnu dot org
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: worm at arrakis dot es @ 2005-10-14 11:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from worm at arrakis dot es 2005-10-14 11:49 -------
Created an attachment (id=9986)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9986&action=view)
Preprocessed source file that reveals the problem
This file was created from the original C++ sources using the -E flag. I can
provide the sources if required.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
2005-10-14 11:49 ` [Bug c++/24362] " worm at arrakis dot es
@ 2005-10-14 11:50 ` pinskia at gcc dot gnu dot org
2005-10-14 11:56 ` [Bug middle-end/24362] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-14 11:50 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
2005-10-14 11:49 ` [Bug c++/24362] " worm at arrakis dot es
2005-10-14 11:50 ` [Bug middle-end/24362] " pinskia at gcc dot gnu dot org
@ 2005-10-14 11:56 ` pinskia at gcc dot gnu dot org
2005-10-14 12:00 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-14 11:56 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.0.3 4.1.0
Known to work| |3.4.5
Summary|internal compiler error: in |[4.0/4.1 Regression]
|extract_component, at tree- |internal compiler error: in
|complex.c:68 |extract_component, at tree-
| |complex.c:68
Target Milestone|--- |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (2 preceding siblings ...)
2005-10-14 11:56 ` [Bug middle-end/24362] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-10-14 12:00 ` pinskia at gcc dot gnu dot org
2005-10-14 12:05 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-14 12:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-10-14 12:00 -------
Reducing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (3 preceding siblings ...)
2005-10-14 12:00 ` pinskia at gcc dot gnu dot org
@ 2005-10-14 12:05 ` pinskia at gcc dot gnu dot org
2005-10-14 12:14 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-14 12:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2005-10-14 12:05 -------
Here is the source for the 4.1 regression:
typedef __complex__ double cdouble;
inline cdouble to_complex(const double &r, const double &i = 0.0) {
cdouble z;
__real__ z = r;
return z;
}
template<class value_type, bool simple_copy = true, bool atomic = true> class
RefPointer {
};
template<typename elt_t> class Vector : public RefPointer<elt_t> {
public: typedef elt_t number;
static elt_t elt_zero();
};
template <typename t> inline t min(t a, t b) {
}
template<> inline cdouble Vector<cdouble>::elt_zero() {
return to_complex(0.0);
}
template<typename elt_t> class Tensor : public Vector<elt_t> {
};
cdouble trace(const Tensor<cdouble> &t) {
cdouble output = t.elt_zero();
}
----
Note There are two problems here, one for 4.1 and one for 4.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (4 preceding siblings ...)
2005-10-14 12:05 ` pinskia at gcc dot gnu dot org
@ 2005-10-14 12:14 ` pinskia at gcc dot gnu dot org
2005-10-14 12:19 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-14 12:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-10-14 12:13 -------
(In reply to comment #3)
> Here is the source for the 4.1 regression:
I filed that as PR 24365 as it is not reproducible on the 4.0 branch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (5 preceding siblings ...)
2005-10-14 12:14 ` pinskia at gcc dot gnu dot org
@ 2005-10-14 12:19 ` pinskia at gcc dot gnu dot org
2005-10-14 13:38 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-14 12:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2005-10-14 12:19 -------
Reduced testcase for 4.0 at -O0 and 4.1 at -O1:
typedef unsigned int size_t;
typedef __complex__ double cdouble;
template<class value_type, bool simple_copy = true, bool atomic = true>
class RefPointer {
};
template<typename elt_t> class Vector : public RefPointer<elt_t> {
public: typedef elt_t number;
static elt_t elt_zero();
const elt_t *pointer() const;
};
template <typename t> inline t min(t a, t b) {
}
template<typename elt_t> class Tensor : public Vector<elt_t> {
public: typedef Vector<elt_t> vector;
size_t columns(void) const;
size_t rows(void) const;
};
cdouble trace(const Tensor<cdouble> &t) {
const size_t r = t.rows();
const size_t c = t.columns();
cdouble output = t.elt_zero();
const cdouble *data = t.pointer();
for (size_t i = 0, j = min(r,c);
j--;
i += (r+1)) {
output += data[i];
}
return output;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (6 preceding siblings ...)
2005-10-14 12:19 ` pinskia at gcc dot gnu dot org
@ 2005-10-14 13:38 ` pinskia at gcc dot gnu dot org
2005-10-14 14:03 ` pcarlini at suse dot de
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-14 13:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-10-14 13:37 -------
Fully reduced testcase:
typedef __complex__ double cdouble;
cdouble elt_zero();
const cdouble *pointer();
cdouble trace(void) {
cdouble output = elt_zero();
const cdouble *data = pointer();
output += data[1];
return output;
}
----
This works with the C front-end but not with the C++ front-end.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-10-14 13:37:58
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (7 preceding siblings ...)
2005-10-14 13:38 ` pinskia at gcc dot gnu dot org
@ 2005-10-14 14:03 ` pcarlini at suse dot de
2005-10-14 14:10 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pcarlini at suse dot de @ 2005-10-14 14:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pcarlini at suse dot de 2005-10-14 14:03 -------
Are those new problems related to c++/21210?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (8 preceding siblings ...)
2005-10-14 14:03 ` pcarlini at suse dot de
@ 2005-10-14 14:10 ` pinskia at gcc dot gnu dot org
2005-10-26 22:42 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-14 14:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2005-10-14 14:10 -------
(In reply to comment #7)
> Are those new problems related to c++/21210?
No, these new problems are all midlde-end bugs relating to RETURN_DECL not
being handled correctly (or at all).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (9 preceding siblings ...)
2005-10-14 14:10 ` pinskia at gcc dot gnu dot org
@ 2005-10-26 22:42 ` pinskia at gcc dot gnu dot org
2005-10-27 19:49 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-26 22:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2005-10-26 22:42 -------
I have the simple/obvious patch which fixes this one at least the issue in this
PR and not the one in PR 24365 so this will still not work on the mainline.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (10 preceding siblings ...)
2005-10-26 22:42 ` pinskia at gcc dot gnu dot org
@ 2005-10-27 19:49 ` pinskia at gcc dot gnu dot org
2005-10-28 14:26 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-27 19:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from pinskia at gcc dot gnu dot org 2005-10-27 19:49 -------
Will commit once SVN is alive:
<http://gcc.gnu.org/ml/gcc-patches/2005-10/msg01584.html>.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |10/msg01584.html
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (11 preceding siblings ...)
2005-10-27 19:49 ` pinskia at gcc dot gnu dot org
@ 2005-10-28 14:26 ` pinskia at gcc dot gnu dot org
2005-10-28 14:32 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-28 14:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pinskia at gcc dot gnu dot org 2005-10-28 14:26 -------
Subject: Bug 24362
Author: pinskia
Date: Fri Oct 28 14:26:36 2005
New Revision: 105930
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=105930
Log:
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/24362
* g++.dg/opt/complex4.C: New test.
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/24362
* tree-complex.c (extract_component): Treat RESULT_DECL
like the rest of the decls.
Added:
trunk/gcc/testsuite/g++.dg/opt/complex4.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-complex.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (12 preceding siblings ...)
2005-10-28 14:26 ` pinskia at gcc dot gnu dot org
@ 2005-10-28 14:32 ` pinskia at gcc dot gnu dot org
2005-10-28 14:40 ` pinskia at gcc dot gnu dot org
2005-10-28 14:41 ` pinskia at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-28 14:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pinskia at gcc dot gnu dot org 2005-10-28 14:32 -------
Subject: Bug 24362
Author: pinskia
Date: Fri Oct 28 14:26:36 2005
New Revision: 105930
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=105930
Log:
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/24362
* g++.dg/opt/complex4.C: New test.
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/24362
* tree-complex.c (extract_component): Treat RESULT_DECL
like the rest of the decls.
Added:
trunk/gcc/testsuite/g++.dg/opt/complex4.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-complex.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (13 preceding siblings ...)
2005-10-28 14:32 ` pinskia at gcc dot gnu dot org
@ 2005-10-28 14:40 ` pinskia at gcc dot gnu dot org
2005-10-28 14:41 ` pinskia at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-28 14:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from pinskia at gcc dot gnu dot org 2005-10-28 14:40 -------
Subject: Bug 24362
Author: pinskia
Date: Fri Oct 28 14:39:57 2005
New Revision: 105931
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=105931
Log:
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/24362
* g++.dg/opt/complex4.C: New test.
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/24362
* tree-complex.c (extract_component): Treat RESULT_DECL
like the rest of the decls.
Added:
branches/gcc-4_0-branch/gcc/testsuite/g++.dg/opt/complex4.C
Modified:
branches/gcc-4_0-branch/gcc/ChangeLog
branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
branches/gcc-4_0-branch/gcc/tree-complex.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
2005-10-14 11:46 [Bug c++/24362] New: internal compiler error: in extract_component, at tree-complex.c:68 worm at arrakis dot es
` (14 preceding siblings ...)
2005-10-28 14:40 ` pinskia at gcc dot gnu dot org
@ 2005-10-28 14:41 ` pinskia at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-28 14:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from pinskia at gcc dot gnu dot org 2005-10-28 14:41 -------
Fixed. only 4.1 still have issues with this code but that is PR 24365.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362
^ permalink raw reply [flat|nested] 17+ messages in thread