Bug 38663 - OpenMP directive causes internal compiler error
OpenMP directive causes internal compiler error
Status: UNCONFIRMED
Product: gcc
Classification: Unclassified
Component: middle-end
4.4.0
: P3 normal
: ---
Assigned To: Not yet assigned to anyone
: ice-on-valid-code, openmp
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-29 20:11 UTC by Andrew Leaver-Fay
Modified: 2008-12-29 21:38 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
(Gzipped for size) Preprocessed source file that generates the internal compile error. (213.62 KB, application/octet-stream)
2008-12-29 20:21 UTC, Andrew Leaver-Fay
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Leaver-Fay 2008-12-29 20:11:38 UTC
The code compiles without warning if I comment out the omp pragmas.

(Where/how do I upload the .ii file?)

$ ~/gcc4.4/usr/local/bin/g++ --version
g++ (GCC) 4.3.0 20080125 (experimental)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~/gcc4.4/usr/local/bin/g++ -o 
build/src/release/macos/10.4/32/x86/gcc/core/pack/rotamer_set/RotamerSets.os -c -pipe -ffor-scope -fopenmp -W -Wall -pedantic -Wno-long-long -fno-exceptions -O2 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -march=prescott -fPIC -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/32/gcc -Isrc/platform/macos/32 -Isrc/platform/macos -I/Users/plato/gcc4.4/usr/local/include -I/usr/local/include -I/usr/include src/core/pack/rotamer_set/RotamerSets.cc -save-temps
Comment 1 Andrew Leaver-Fay 2008-12-29 20:21:00 UTC
Created attachment 17003 [details]
(Gzipped for size) Preprocessed source file that generates the internal compile error.
Comment 2 Andrew Leaver-Fay 2008-12-29 20:27:03 UTC
Debug build works just fine.  -O2 and -O3 both fail.  Release build is fine with g++4 on linux.

$g++4 --version
g++4 (GCC) 4.1.0 20060515 (Red Hat 4.1.0-18)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Comment 3 Jakub Jelinek 2008-12-29 20:46:34 UTC
So what gcc are you using? 4.4 (which revision) or 4.3.0 20080125?
In any case, this compiles just fine for me with both 4.3.2-RH and 4.4 trunk.
Comment 4 Andrew Pinski 2008-12-29 20:47:35 UTC
Also what is the ICE?
Comment 5 Andrew Leaver-Fay 2008-12-29 21:30:20 UTC
(In reply to comment #3)
> So what gcc are you using? 4.4 (which revision) or 4.3.0 20080125?
> In any case, this compiles just fine for me with both 4.3.2-RH and 4.4 trunk.
> 

I downloaded gcc4.4 as a package here:

http://hpc.sourceforge.net/

taking the intel mac version:
gcc-intel-bin.tar.gz

With that installation came g++4.3.  Go figure.

If 4.3.0 is not the latest release of an intel-mac compatible g++, can you point me to where I can download it?  (I'd greatly prefer not to build from source, as my previous experiences doing so have been unpleasant).

Comment 6 Andrew Leaver-Fay 2008-12-29 21:36:33 UTC
(In reply to comment #4)
> Also what is the ICE?
> 

OOH -- ICE ==  internal compiler error.
http://www.acronymfinder.com/ICE.html

It's a bus error.

$ ~/gcc4.4/usr/local/bin/g++ -o build/src/release/macos/10.4/32/x86/gcc/core/pack/rotamer_set/RotamerSets.os -c -pipe -ffor-scope -fopenmp -W -Wall -pedantic -Wno-long-long -fno-exceptions -O2 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -march=prescott -fPIC -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/macos/32/gcc -Isrc/platform/macos/32 -Isrc/platform/macos -I/Users/plato/gcc4.4/usr/local/include -I/usr/local/include -I/usr/include src/core/pack/rotamer_set/RotamerSets.cc -save-temps
g++: warning: -pipe ignored because -save-temps specified
src/core/pack/rotamer_set/RotamerSets.cc: In member function 'void core::pack::rotamer_set::RotamerSets::precompute_two_body_energies(const core::pose::Pose&, const core::scoring::ScoreFunction&, core::graph::GraphCOP, core::pack::interaction_graph::PrecomputedPairEnergiesInteractionGraphOP, bool)':
src/core/pack/rotamer_set/RotamerSets.cc:317: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

If it helps, I'm building on a Mac OSX 10.4.11 with an Intel Core 2 duo processor. 
Comment 7 Andrew Leaver-Fay 2008-12-29 21:38:12 UTC
> In reply to comment #6)
> (In reply to comment #4)
> > Also what is the ICE?
> > 
> 
> OOH -- ICE ==  internal compiler error.
> http://www.acronymfinder.com/ICE.html
> 
> It's a bus error.
> 
> $ ~/gcc4.4/usr/local/bin/g++ -o
> build/src/release/macos/10.4/32/x86/gcc/core/pack/rotamer_set/RotamerSets.os -c
> -pipe -ffor-scope -fopenmp -W -Wall -pedantic -Wno-long-long -fno-exceptions
> -O2 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s
> -Wno-unused-variable -march=prescott -fPIC -DNDEBUG -Isrc -Iexternal/include
> -Isrc/platform/macos/32/gcc -Isrc/platform/macos/32 -Isrc/platform/macos
> -I/Users/plato/gcc4.4/usr/local/include -I/usr/local/include -I/usr/include
> src/core/pack/rotamer_set/RotamerSets.cc -save-temps
> g++: warning: -pipe ignored because -save-temps specified
> src/core/pack/rotamer_set/RotamerSets.cc: In member function 'void
> core::pack::rotamer_set::RotamerSets::precompute_two_body_energies(const
> core::pose::Pose&, const core::scoring::ScoreFunction&, core::graph::GraphCOP,
> core::pack::interaction_graph::PrecomputedPairEnergiesInteractionGraphOP,
> bool)':
> src/core/pack/rotamer_set/RotamerSets.cc:317: internal compiler error: Bus
> error
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> 
> If it helps, I'm building on a Mac OSX 10.4.11 with an Intel Core 2 duo
> processor. 
> 

Line 314 is the next non-whitespace line after the end of the omp parallel block.