public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33435] New: internal compiler error with templates and openmp
@ 2007-09-14 12:48 E dot Kuemmerle at fz-juelich dot de
2007-09-18 19:16 ` [Bug c++/33435] " bangerth at dealii dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: E dot Kuemmerle at fz-juelich dot de @ 2007-09-14 12:48 UTC (permalink / raw)
To: gcc-bugs
I get the error message
bug.cpp:16: internal compiler error: in create_tmp_var, at gimplify.c:487
when compiling the following code with
g++ -fopenmp -DTVMET_OPTIMIZE -c bug.cpp
where bug.cpp contains:
#include <tvmet/Vector.h> // Tiny Vector Matrix library using
Expression Templates
#include <tvmet/VectorFunctions.h> // http://tvmet.sourceforge.net/
using namespace tvmet;
int main() {
Vector<int,3> a[10];
int i;
#pragma omp parallel
{
#pragma omp for schedule(dynamic)
for (i=0; i<10; ++i) {
// do something
}
#pragma omp master
{
a[0] = a[1];
}
#pragma omp for schedule(dynamic)
for (i=0; i<10; ++i) {
// do something
}
}
}
The problem is definitely related to openmp because the following code compiles
without any error:
#include <tvmet/Vector.h> // Tiny Vector Matrix library using
Expression Templates
#include <tvmet/VectorFunctions.h> // http://tvmet.sourceforge.net/
using namespace tvmet;
int main() {
Vector<int,3> a[10];
int i;
#pragma omp parallel for schedule(dynamic)
for (i=0; i<10; ++i) {
// do something
}
a[0] = a[1];
#pragma omp parallel for schedule(dynamic)
for (i=0; i<10; ++i) {
// do something
}
}
--
Summary: internal compiler error with templates and openmp
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: E dot Kuemmerle at fz-juelich dot de
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33435
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/33435] internal compiler error with templates and openmp
2007-09-14 12:48 [Bug c++/33435] New: internal compiler error with templates and openmp E dot Kuemmerle at fz-juelich dot de
@ 2007-09-18 19:16 ` bangerth at dealii dot org
2007-09-19 9:40 ` E dot Kuemmerle at fz-juelich dot de
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2007-09-18 19:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from bangerth at dealii dot org 2007-09-18 19:16 -------
Can you try to come up with an example that is self-contained,
i.e. only contains those parts of the Tiny Vector Matrix library
that are really used (or none at all)?
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at dealii dot org
Summary|internal compiler error with|internal compiler error with
|templates and openmp |templates and openmp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33435
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/33435] internal compiler error with templates and openmp
2007-09-14 12:48 [Bug c++/33435] New: internal compiler error with templates and openmp E dot Kuemmerle at fz-juelich dot de
2007-09-18 19:16 ` [Bug c++/33435] " bangerth at dealii dot org
@ 2007-09-19 9:40 ` E dot Kuemmerle at fz-juelich dot de
2007-09-23 17:21 ` bangerth at dealii dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: E dot Kuemmerle at fz-juelich dot de @ 2007-09-19 9:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from E dot Kuemmerle at fz-juelich dot de 2007-09-19 09:40 -------
Here is a self-contained example:
template<class T, int Sz>
class Vector {
public:
explicit Vector() {}
~Vector() {}
private:
T m_data[Sz];
};
int main() {
Vector<int,3> a[10];
int i;
#pragma omp parallel
{
#pragma omp for schedule(dynamic)
for (i=0; i<10; ++i) {
// do something
}
#pragma omp master
{
a[0] = a[1];
}
#pragma omp for schedule(dynamic)
for (i=0; i<10; ++i) {
// do something
}
}
}
I can avoid the internal compiler error by:
1) removing the '-fopenmp' option
2) changing the '#pragma omp' statements as shown in the original example
3) removing the destructor '~Vector() {}' from 'class Vector' in the new
example!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33435
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/33435] internal compiler error with templates and openmp
2007-09-14 12:48 [Bug c++/33435] New: internal compiler error with templates and openmp E dot Kuemmerle at fz-juelich dot de
2007-09-18 19:16 ` [Bug c++/33435] " bangerth at dealii dot org
2007-09-19 9:40 ` E dot Kuemmerle at fz-juelich dot de
@ 2007-09-23 17:21 ` bangerth at dealii dot org
2008-03-12 14:46 ` E dot Kuemmerle at fz-juelich dot de
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2007-09-23 17:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from bangerth at dealii dot org 2007-09-23 17:20 -------
Confirmed.
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-09-23 17:20:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33435
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/33435] internal compiler error with templates and openmp
2007-09-14 12:48 [Bug c++/33435] New: internal compiler error with templates and openmp E dot Kuemmerle at fz-juelich dot de
` (2 preceding siblings ...)
2007-09-23 17:21 ` bangerth at dealii dot org
@ 2008-03-12 14:46 ` E dot Kuemmerle at fz-juelich dot de
2008-06-16 15:04 ` bangerth at dealii dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: E dot Kuemmerle at fz-juelich dot de @ 2008-03-12 14:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from E dot Kuemmerle at fz-juelich dot de 2008-03-12 14:45 -------
The bug ist still present in gcc 4.3.0:
bug.cpp:16: internal compiler error: in create_tmp_var, at gimplify.c:497
--
E dot Kuemmerle at fz-juelich dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|4.2.1 |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33435
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/33435] internal compiler error with templates and openmp
2007-09-14 12:48 [Bug c++/33435] New: internal compiler error with templates and openmp E dot Kuemmerle at fz-juelich dot de
` (3 preceding siblings ...)
2008-03-12 14:46 ` E dot Kuemmerle at fz-juelich dot de
@ 2008-06-16 15:04 ` bangerth at dealii dot org
2008-06-17 14:07 ` E dot Kuemmerle at fz-juelich dot de
2008-06-18 7:21 ` E dot Kuemmerle at fz-juelich dot de
6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2008-06-16 15:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from bangerth at dealii dot org 2008-06-16 15:03 -------
This appears to work for me now with
gcc version 4.4.0 20080527 (experimental) [trunk revision 136055] (GCC)
Can you check whether it also works for you?
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33435
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/33435] internal compiler error with templates and openmp
2007-09-14 12:48 [Bug c++/33435] New: internal compiler error with templates and openmp E dot Kuemmerle at fz-juelich dot de
` (4 preceding siblings ...)
2008-06-16 15:04 ` bangerth at dealii dot org
@ 2008-06-17 14:07 ` E dot Kuemmerle at fz-juelich dot de
2008-06-18 7:21 ` E dot Kuemmerle at fz-juelich dot de
6 siblings, 0 replies; 8+ messages in thread
From: E dot Kuemmerle at fz-juelich dot de @ 2008-06-17 14:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from E dot Kuemmerle at fz-juelich dot de 2008-06-17 14:06 -------
I tried gcc 4.4.0 20080613 (experimental):
indeed, it works now!
--
E dot Kuemmerle at fz-juelich dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33435
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/33435] internal compiler error with templates and openmp
2007-09-14 12:48 [Bug c++/33435] New: internal compiler error with templates and openmp E dot Kuemmerle at fz-juelich dot de
` (5 preceding siblings ...)
2008-06-17 14:07 ` E dot Kuemmerle at fz-juelich dot de
@ 2008-06-18 7:21 ` E dot Kuemmerle at fz-juelich dot de
6 siblings, 0 replies; 8+ messages in thread
From: E dot Kuemmerle at fz-juelich dot de @ 2008-06-18 7:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from E dot Kuemmerle at fz-juelich dot de 2008-06-18 07:20 -------
gcc release 4.3.1 already works!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33435
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-06-18 7:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-14 12:48 [Bug c++/33435] New: internal compiler error with templates and openmp E dot Kuemmerle at fz-juelich dot de
2007-09-18 19:16 ` [Bug c++/33435] " bangerth at dealii dot org
2007-09-19 9:40 ` E dot Kuemmerle at fz-juelich dot de
2007-09-23 17:21 ` bangerth at dealii dot org
2008-03-12 14:46 ` E dot Kuemmerle at fz-juelich dot de
2008-06-16 15:04 ` bangerth at dealii dot org
2008-06-17 14:07 ` E dot Kuemmerle at fz-juelich dot de
2008-06-18 7:21 ` E dot Kuemmerle at fz-juelich dot de
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).