public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33581] New: OpenMP segmentation fault
@ 2007-09-28 8:15 spollmann at gmail dot com
2007-09-28 8:22 ` [Bug c++/33581] " spollmann at gmail dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: spollmann at gmail dot com @ 2007-09-28 8:15 UTC (permalink / raw)
To: gcc-bugs
The following code (a general case) generates a segmentation fault when
compiled with the -m32 and -fopenmp switch in gcc 4.2.1. With the -m32 switch
removed, the program executes correctly.
#include <iostream>
int main()
{
int x;
#pragma omp parallel for
for (x = 0; x < 100; x++)
{
std::cout << x << std::endl;
}
return 0;
}
compile command line: /usr/local/gcc-4.2.1/bin/g++ --static -fopenmp -m32 -o
openMPTestProgram openMPTest.cpp
System: SUSE 10 x64 linux distribution,
(Dual-core Intel(R) Pentium(R) D CPU 2.80GHz system), 4GB ram
GCC configuration option: ../gcc-4.2.1/configure --prefix=/usr/local/gcc-4.2.1
--
Summary: OpenMP segmentation fault
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: spollmann at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33581
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/33581] OpenMP segmentation fault
2007-09-28 8:15 [Bug c++/33581] New: OpenMP segmentation fault spollmann at gmail dot com
@ 2007-09-28 8:22 ` spollmann at gmail dot com
2007-09-28 9:36 ` [Bug middle-end/33581] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: spollmann at gmail dot com @ 2007-09-28 8:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from spollmann at gmail dot com 2007-09-28 08:22 -------
to clarify; the resultant executable of the test case above generates the
segmentation fault, not the compiler during compilation.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33581
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33581] OpenMP segmentation fault
2007-09-28 8:15 [Bug c++/33581] New: OpenMP segmentation fault spollmann at gmail dot com
2007-09-28 8:22 ` [Bug c++/33581] " spollmann at gmail dot com
2007-09-28 9:36 ` [Bug middle-end/33581] " pinskia at gcc dot gnu dot org
@ 2007-09-28 9:36 ` pinskia at gcc dot gnu dot org
2007-09-29 7:04 ` spollmann at gmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-28 9:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-09-28 09:36 -------
What happens if you don't use -static?
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33581
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33581] OpenMP segmentation fault
2007-09-28 8:15 [Bug c++/33581] New: OpenMP segmentation fault spollmann at gmail dot com
2007-09-28 8:22 ` [Bug c++/33581] " spollmann at gmail dot com
@ 2007-09-28 9:36 ` pinskia at gcc dot gnu dot org
2007-09-28 9:36 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-28 9:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-09-28 09:36 -------
-static is not really supported for glibc and pthreads/openmp.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |middle-end
Keywords| |openmp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33581
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33581] OpenMP segmentation fault
2007-09-28 8:15 [Bug c++/33581] New: OpenMP segmentation fault spollmann at gmail dot com
` (2 preceding siblings ...)
2007-09-28 9:36 ` pinskia at gcc dot gnu dot org
@ 2007-09-29 7:04 ` spollmann at gmail dot com
2007-09-29 7:10 ` spollmann at gmail dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: spollmann at gmail dot com @ 2007-09-29 7:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from spollmann at gmail dot com 2007-09-29 07:04 -------
(In reply to comment #3)
> What happens if you don't use -static?
if static is not used (and the LD_LIBRARY_PATH points to the correct location
;)
the program seems to execute correctly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33581
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33581] OpenMP segmentation fault
2007-09-28 8:15 [Bug c++/33581] New: OpenMP segmentation fault spollmann at gmail dot com
` (3 preceding siblings ...)
2007-09-29 7:04 ` spollmann at gmail dot com
@ 2007-09-29 7:10 ` spollmann at gmail dot com
2007-09-29 8:50 ` pinskia at gcc dot gnu dot org
2007-10-26 6:49 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: spollmann at gmail dot com @ 2007-09-29 7:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from spollmann at gmail dot com 2007-09-29 07:10 -------
(In reply to comment #4)
> (In reply to comment #3)
> > What happens if you don't use -static?
> if static is not used (and the LD_LIBRARY_PATH points to the correct location
> ;)
> the program seems to execute correctly.
I didn't think that -static was causing the problem since the application seems
to execute correctly with the -m32 option removed, and with the -static
remaining.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33581
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33581] OpenMP segmentation fault
2007-09-28 8:15 [Bug c++/33581] New: OpenMP segmentation fault spollmann at gmail dot com
` (4 preceding siblings ...)
2007-09-29 7:10 ` spollmann at gmail dot com
@ 2007-09-29 8:50 ` pinskia at gcc dot gnu dot org
2007-10-26 6:49 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-29 8:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-09-29 08:50 -------
(In reply to comment #5)
> I didn't think that -static was causing the problem since the application seems
> to execute correctly with the -m32 option removed, and with the -static
> remaining.
glibc is slightly different between the 32bit version and the 64bit version.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33581
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33581] OpenMP segmentation fault
2007-09-28 8:15 [Bug c++/33581] New: OpenMP segmentation fault spollmann at gmail dot com
` (5 preceding siblings ...)
2007-09-29 8:50 ` pinskia at gcc dot gnu dot org
@ 2007-10-26 6:49 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-10-26 6:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2007-10-26 06:49 -------
Using -static for threaded programs is highly discouraged in glibc, for many
reasons. If you want to do it anyway for whatever weird reason, you usually
need
to use -Wl,--whole-archive -lnptl -Wl,--no-whole-archive.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33581
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-10-26 6:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-28 8:15 [Bug c++/33581] New: OpenMP segmentation fault spollmann at gmail dot com
2007-09-28 8:22 ` [Bug c++/33581] " spollmann at gmail dot com
2007-09-28 9:36 ` [Bug middle-end/33581] " pinskia at gcc dot gnu dot org
2007-09-28 9:36 ` pinskia at gcc dot gnu dot org
2007-09-29 7:04 ` spollmann at gmail dot com
2007-09-29 7:10 ` spollmann at gmail dot com
2007-09-29 8:50 ` pinskia at gcc dot gnu dot org
2007-10-26 6:49 ` 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).