public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/24849] New: [gomp] ICE in expand_expr_real_1
@ 2005-11-14 15:09 martin at mpa-garching dot mpg dot de
2005-11-14 15:14 ` [Bug c++/24849] " martin at mpa-garching dot mpg dot de
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2005-11-14 15:09 UTC (permalink / raw)
To: gcc-bugs
The head of the gomp branch reports an ICE when trying to compile the snippet
below:
template<typename T> struct Healpix_Map {
T *map;
int npix_;
void Import_nograde (const Healpix_Map<T> &orig) {
#pragma omp parallel
{
int m;
#pragma omp for schedule (dynamic)
for (m=0; m<npix_; ++m) map[m] = orig.map[m];
}
}
};
void foo(Healpix_Map<int> &a, Healpix_Map<int> &b) {
a.Import_nograde(b);
}
~/tmp>g++ -v -c -fopenmp test.cc
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /scratch/gompcc/configure --quiet --prefix=/scratch/ugccgomp
--enable-languages=c++,f
ortran --with-gmp=/afs/mpa/data/martin/mygmp
Thread model: posix
gcc version 4.1.0-gomp-20050608-branch 20051109 (experimental) (merged
20051109)
/scratch/ugccgomp/libexec/gcc/i686-pc-linux-gnu/4.1.0-gomp-20050608-branch/cc1plus
-quiet -v -D_GNU_S
OURCE test.cc -quiet -dumpbase test.cc -mtune=pentiumpro -auxbase test -version
-fopenmp -o /tmp/ccCSV
0EZ.s
ignoring nonexistent directory
"/scratch/ugccgomp/lib/gcc/i686-pc-linux-gnu/4.1.0-gomp-20050608-branch
/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/scratch/ugccgomp/lib/gcc/i686-pc-linux-gnu/4.1.0-gomp-20050608-branch/../../../../include/c++/4.1.0-
gomp-20050608-branch
/scratch/ugccgomp/lib/gcc/i686-pc-linux-gnu/4.1.0-gomp-20050608-branch/../../../../include/c++/4.1.0-
gomp-20050608-branch/i686-pc-linux-gnu
/scratch/ugccgomp/lib/gcc/i686-pc-linux-gnu/4.1.0-gomp-20050608-branch/../../../../include/c++/4.1.0-
gomp-20050608-branch/backward
/usr/local/include
/scratch/ugccgomp/include
/scratch/ugccgomp/lib/gcc/i686-pc-linux-gnu/4.1.0-gomp-20050608-branch/include
/usr/include
End of search list.
GNU C++ version 4.1.0-gomp-20050608-branch 20051109 (experimental) (merged
20051109) (i686-pc-linux-gn
u)
compiled by GNU C version 4.1.0-gomp-20050608-branch 20051109
(experimental) (merged 20051109)
.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: d8a8851eea700f35b0082059a490739d
test.cc: In member function 'void Healpix_Map<T>::Import_nograde(const
Healpix_Map<T>&) [with T = int]
':
test.cc:9: internal compiler error: in expand_expr_real_1, at expr.c:6681
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: [gomp] ICE in expand_expr_real_1
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martin at mpa-garching dot mpg dot de
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24849
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/24849] [gomp] ICE in expand_expr_real_1
2005-11-14 15:09 [Bug c++/24849] New: [gomp] ICE in expand_expr_real_1 martin at mpa-garching dot mpg dot de
@ 2005-11-14 15:14 ` martin at mpa-garching dot mpg dot de
2005-11-15 8:59 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2005-11-14 15:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from martin at mpa-garching dot mpg dot de 2005-11-14 15:14 -------
> gcc version 4.1.0-gomp-20050608-branch 20051109 (experimental) (merged
20051109)
BTW, it appears as if the compiler datestamp is not correctly updated on
the gomp branch (it says 20051109, but there have been commits to the branch
after that date).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24849
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/24849] [gomp] ICE in expand_expr_real_1
2005-11-14 15:09 [Bug c++/24849] New: [gomp] ICE in expand_expr_real_1 martin at mpa-garching dot mpg dot de
2005-11-14 15:14 ` [Bug c++/24849] " martin at mpa-garching dot mpg dot de
@ 2005-11-15 8:59 ` jakub at gcc dot gnu dot org
2005-11-15 9:08 ` martin at mpa-garching dot mpg dot de
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-11-15 8:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2005-11-15 08:59 -------
The problem here is a mismatch between determine_parallel_type in gimplify.c
and omp-low.c. During gimplification, it is not considered to be a combined
parallel loop, because OMP_PARALLEL's body contains a DECL_EXPR (for m
variable)
before OMP_FOR. But during omp lowering, that DECL_EXPR is already gone and
therefore the loop is handled as a combined loop. But there are statements
before the FOR_STMT inside of OMP_FOR, and those are moved into a wrong context
when doing a parallel loop.
Maybe we should ignore (some?) DECL_EXPRs in determine_parallel_type, maybe
we need to note the combined parallel status in OMP_PARALLEL's flags.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org,
| |dnovillo at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24849
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/24849] [gomp] ICE in expand_expr_real_1
2005-11-14 15:09 [Bug c++/24849] New: [gomp] ICE in expand_expr_real_1 martin at mpa-garching dot mpg dot de
2005-11-14 15:14 ` [Bug c++/24849] " martin at mpa-garching dot mpg dot de
2005-11-15 8:59 ` jakub at gcc dot gnu dot org
@ 2005-11-15 9:08 ` martin at mpa-garching dot mpg dot de
2005-11-16 15:57 ` dnovillo at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2005-11-15 9:08 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2558 bytes --]
------- Comment #3 from martin at mpa-garching dot mpg dot de 2005-11-15 09:07 -------
Some more information:
- I didn't encounter the bug about a week ago
- on x86_64 with checking disabled, I get
guest@mpac-7:~/martin> g++ -c -v -fopenmp test.cc
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/guest/martin/gompcc/configure --quiet
--prefix=/home/guest/martin/ugccgomp --disable-checking
--enable-languages=c++,fortran --with-gmp=/home/guest/martin/mygmp
Thread model: posix
gcc version 4.1.0-gomp-20050608-branch 20051109 (experimental) (merged
20051109)
/home/guest/martin/ugccgomp/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/cc1plus
-quiet -v -D_GNU_SOURCE test.cc -quiet -dumpbase test.cc -mtune=k8 -auxbase
test -version -fopenmp -o /tmp/ccH4pPJ3.s
ignoring nonexistent directory
"/home/guest/martin/ugccgomp/lib/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/home/guest/martin/ugccgomp/lib/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/../../../../include/c++/4.1.0-gomp-20050608-branch
/home/guest/martin/ugccgomp/lib/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/../../../../include/c++/4.1.0-gomp-20050608-branch/x86_64-unknown-linux-gnu
/home/guest/martin/ugccgomp/lib/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/../../../../include/c++/4.1.0-gomp-20050608-branch/backward
/usr/local/include
/home/guest/martin/ugccgomp/include
/home/guest/martin/ugccgomp/lib/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/include
/usr/include
End of search list.
GNU C++ version 4.1.0-gomp-20050608-branch 20051109 (experimental) (merged
20051109) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.1.0-gomp-20050608-branch 20051109
(experimental) (merged 20051109).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 77b131b8a7d189e4ba7ca911c1f9b018
test.cc: In member function â:
test.cc:10: error: insn does not satisfy its constraints:
(insn 14 13 38 (set (reg:DI 0 ax [orig:58 D.2187 ] [58])
(sign_extend:DI (reg:SI 77 [ D.2153 ]))) 115 {extendsidi2_rex64} (nil)
(nil))
test.cc:10: internal compiler error: in extract_constrain_insn_cached, at
recog.c:2002
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24849
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/24849] [gomp] ICE in expand_expr_real_1
2005-11-14 15:09 [Bug c++/24849] New: [gomp] ICE in expand_expr_real_1 martin at mpa-garching dot mpg dot de
` (2 preceding siblings ...)
2005-11-15 9:08 ` martin at mpa-garching dot mpg dot de
@ 2005-11-16 15:57 ` dnovillo at gcc dot gnu dot org
2005-11-17 10:02 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2005-11-16 15:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dnovillo at gcc dot gnu dot org 2005-11-16 15:57 -------
Working on this.
--
dnovillo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dnovillo at gcc dot gnu dot
|dot org |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24849
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/24849] [gomp] ICE in expand_expr_real_1
2005-11-14 15:09 [Bug c++/24849] New: [gomp] ICE in expand_expr_real_1 martin at mpa-garching dot mpg dot de
` (3 preceding siblings ...)
2005-11-16 15:57 ` dnovillo at gcc dot gnu dot org
@ 2005-11-17 10:02 ` reichelt at gcc dot gnu dot org
2005-11-19 15:18 ` dnovillo at gcc dot gnu dot org
2005-11-19 15:18 ` dnovillo at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-11-17 10:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from reichelt at gcc dot gnu dot org 2005-11-17 10:02 -------
Here's a shorter testcase without templates:
==========================================
void foo()
{
#pragma omp parallel
{
int i, N;
#pragma omp for schedule (dynamic)
for (i=0; i<N; ++i) ;
}
}
==========================================
The bug only affects the C++ frontend.
The above testcase compiles fine with the C frontend.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |monitored
Last reconfirmed|0000-00-00 00:00:00 |2005-11-17 10:02:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24849
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/24849] [gomp] ICE in expand_expr_real_1
2005-11-14 15:09 [Bug c++/24849] New: [gomp] ICE in expand_expr_real_1 martin at mpa-garching dot mpg dot de
` (5 preceding siblings ...)
2005-11-19 15:18 ` dnovillo at gcc dot gnu dot org
@ 2005-11-19 15:18 ` dnovillo at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2005-11-19 15:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dnovillo at gcc dot gnu dot org 2005-11-19 15:18 -------
Workaround applied.
The actual solution separates lowering from optimization, once all the OMP
directives are lowered to a language-independent form, we can apply the
combined parallel+loop optimization without running into these odd corners.
I need a few more days to finish implementing this separation. In the
meantime, we can live without this optimization.
--
dnovillo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24849
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/24849] [gomp] ICE in expand_expr_real_1
2005-11-14 15:09 [Bug c++/24849] New: [gomp] ICE in expand_expr_real_1 martin at mpa-garching dot mpg dot de
` (4 preceding siblings ...)
2005-11-17 10:02 ` reichelt at gcc dot gnu dot org
@ 2005-11-19 15:18 ` dnovillo at gcc dot gnu dot org
2005-11-19 15:18 ` dnovillo at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2005-11-19 15:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dnovillo at gcc dot gnu dot org 2005-11-19 15:18 -------
Subject: Bug 24849
Author: dnovillo
Date: Sat Nov 19 15:18:08 2005
New Revision: 107220
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107220
Log:
PR 24849
* omp-low.c (determine_parallel_type): Do not handle OMP_FOR.
testsuite/
PR 24849
* g++.dg/gomp/pr24849.C: New test.
* gcc.dg/gomp/for-19.c: XFAIL.
* gcc.dg/gomp/for-18.c: XFAIL.
Added:
branches/gomp-20050608-branch/gcc/testsuite/g++.dg/gomp/pr24849.C
Modified:
branches/gomp-20050608-branch/gcc/ChangeLog.gomp
branches/gomp-20050608-branch/gcc/omp-low.c
branches/gomp-20050608-branch/gcc/testsuite/ChangeLog.gomp
branches/gomp-20050608-branch/gcc/testsuite/gcc.dg/gomp/for-18.c
branches/gomp-20050608-branch/gcc/testsuite/gcc.dg/gomp/for-19.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24849
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-11-19 15:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-14 15:09 [Bug c++/24849] New: [gomp] ICE in expand_expr_real_1 martin at mpa-garching dot mpg dot de
2005-11-14 15:14 ` [Bug c++/24849] " martin at mpa-garching dot mpg dot de
2005-11-15 8:59 ` jakub at gcc dot gnu dot org
2005-11-15 9:08 ` martin at mpa-garching dot mpg dot de
2005-11-16 15:57 ` dnovillo at gcc dot gnu dot org
2005-11-17 10:02 ` reichelt at gcc dot gnu dot org
2005-11-19 15:18 ` dnovillo at gcc dot gnu dot org
2005-11-19 15:18 ` dnovillo 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).