public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49223] New: Internal compiler error when using OpenMP
@ 2011-05-29 10:01 ttsiodras at gmail dot com
2011-05-30 11:56 ` [Bug c++/49223] " jakub at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ttsiodras at gmail dot com @ 2011-05-29 10:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49223
Summary: Internal compiler error when using OpenMP
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ttsiodras@gmail.com
Created attachment 24391
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24391
Preprocessed output from input C++ file that triggers the bug.
When using -fopenmp, compiling my open source renderer (
http://users.softlab.ece.ntua.gr/~ttsiod/renderer.html ) triggers an internal
compiler error. This did not happen with previous versions of GCC (I've added
OpenMP support and seen it work fine since GCC 4.3.2).
bash$ make
...
g++ -DHAVE_CONFIG_H -I. -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
-I./../lib3ds-1.3.0/ -fopenmp -O3 -g -Wall -Wextra -fomit-frame-pointer
-ffast-math -funsafe-math-optimizations -mtune=native -msse -mrecip
-mfpmath=sse -msse2 -mssse3 -DNDEBUG -MT renderer-Rasterizers.o -MD -MP -MF
.deps/renderer-Rasterizers.Tpo -c -o renderer-Rasterizers.o `test -f
'Rasterizers.cc' || echo './'`Rasterizers.cc
Rasterizers.cc: In member function 'void
RasterizeScene<TriangleCarrier>::DrawTriangles(int, int) const':
Rasterizers.cc:250:100: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
I attach the preprocessed output that easily reproduces the bug. With -fopenmp,
the compiler crashes:
bash$ g++ -c -fopenmp -O3 -g -Wall -Wextra -fomit-frame-pointer
-ffast-math -funsafe-math-optimizations -mtune=native -msse -mrecip
-mfpmath=sse -msse2 -mssse3 renderer-Rasterizers.i
...without it, it works:
bash$ g++ -c -O3 -g -Wall -Wextra -fomit-frame-pointer -ffast-math
-funsafe-math-optimizations -mtune=native -msse -mrecip -mfpmath=sse -msse2
-mssse3 renderer-Rasterizers.i
Version of GCC (g++ -v):
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /build/src/gcc-4.6-20110513/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --enable-gnu-unique-object
--enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto
--enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold
--disable-multilib --disable-libstdcxx-pch --enable-checking=release
Thread model: posix
gcc version 4.6.0 20110513 (prerelease) (GCC)
System Type (uname -a):
Linux home 2.6.38-ARCH #1 SMP PREEMPT Fri May 13 07:54:18 UTC 2011 i686
Intel(R) Celeron(R) CPU E3400 @ 2.60GHz GenuineIntel GNU/Linux
Kind regards,
Thanassis Tsiodras, Dr.-Ing.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/49223] Internal compiler error when using OpenMP
2011-05-29 10:01 [Bug c++/49223] New: Internal compiler error when using OpenMP ttsiodras at gmail dot com
@ 2011-05-30 11:56 ` jakub at gcc dot gnu.org
2011-05-30 12:00 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-30 11:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49223
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011.05.30 11:55:00
CC| |jakub at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.6.1
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/49223] Internal compiler error when using OpenMP
2011-05-29 10:01 [Bug c++/49223] New: Internal compiler error when using OpenMP ttsiodras at gmail dot com
2011-05-30 11:56 ` [Bug c++/49223] " jakub at gcc dot gnu.org
@ 2011-05-30 12:00 ` jakub at gcc dot gnu.org
2011-05-30 12:19 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-30 12:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49223
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-30 11:56:18 UTC ---
Created attachment 24394
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24394
gcc46-pr49223.patch
Untested fix. The problem is that require_complete_type is just a nop if
processing_template_decl, so we can't rely on the type being actually complete.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/49223] Internal compiler error when using OpenMP
2011-05-29 10:01 [Bug c++/49223] New: Internal compiler error when using OpenMP ttsiodras at gmail dot com
2011-05-30 11:56 ` [Bug c++/49223] " jakub at gcc dot gnu.org
2011-05-30 12:00 ` jakub at gcc dot gnu.org
@ 2011-05-30 12:19 ` jakub at gcc dot gnu.org
2011-05-30 12:20 ` jakub at gcc dot gnu.org
2011-06-01 11:09 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-30 12:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49223
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-30 12:16:08 UTC ---
Author: jakub
Date: Mon May 30 12:16:04 2011
New Revision: 174432
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174432
Log:
PR c++/49223
* semantics.c (finish_omp_clauses): Call require_complete_type
even for copyin/copyprivate clauses. Only call
cxx_omp_create_clause_info if inner_type is COMPLETE_TYPE_P.
* g++.dg/gomp/pr49223-1.C: New test.
* g++.dg/gomp/pr49223-2.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/gomp/pr49223-1.C
trunk/gcc/testsuite/g++.dg/gomp/pr49223-2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/49223] Internal compiler error when using OpenMP
2011-05-29 10:01 [Bug c++/49223] New: Internal compiler error when using OpenMP ttsiodras at gmail dot com
` (2 preceding siblings ...)
2011-05-30 12:19 ` jakub at gcc dot gnu.org
@ 2011-05-30 12:20 ` jakub at gcc dot gnu.org
2011-06-01 11:09 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-30 12:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49223
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-30 12:19:02 UTC ---
Author: jakub
Date: Mon May 30 12:18:59 2011
New Revision: 174433
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174433
Log:
PR c++/49223
* semantics.c (finish_omp_clauses): Call require_complete_type
even for copyin/copyprivate clauses. Only call
cxx_omp_create_clause_info if inner_type is COMPLETE_TYPE_P.
* g++.dg/gomp/pr49223-1.C: New test.
* g++.dg/gomp/pr49223-2.C: New test.
Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/gomp/pr49223-1.C
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/gomp/pr49223-2.C
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/semantics.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/49223] Internal compiler error when using OpenMP
2011-05-29 10:01 [Bug c++/49223] New: Internal compiler error when using OpenMP ttsiodras at gmail dot com
` (3 preceding siblings ...)
2011-05-30 12:20 ` jakub at gcc dot gnu.org
@ 2011-06-01 11:09 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-06-01 11:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49223
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-06-01 11:08:38 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-01 11:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-29 10:01 [Bug c++/49223] New: Internal compiler error when using OpenMP ttsiodras at gmail dot com
2011-05-30 11:56 ` [Bug c++/49223] " jakub at gcc dot gnu.org
2011-05-30 12:00 ` jakub at gcc dot gnu.org
2011-05-30 12:19 ` jakub at gcc dot gnu.org
2011-05-30 12:20 ` jakub at gcc dot gnu.org
2011-06-01 11:09 ` jakub at gcc dot gnu.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).