Bug 46989 - Mixing "-fprofile-arcs -ftest-coverage" and OpenMP triggers a bug
Summary: Mixing "-fprofile-arcs -ftest-coverage" and OpenMP triggers a bug
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-17 10:06 UTC by Sylvestre Ledru
Modified: 2010-12-17 19:52 UTC (History)
0 users

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


Attachments
sci_parallel_run.ii (115.66 KB, application/octet-stream)
2010-12-17 14:40 UTC, Sylvestre Ledru
Details
sci_parallel_run.s (24.85 KB, application/octet-stream)
2010-12-17 14:41 UTC, Sylvestre Ledru
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvestre Ledru 2010-12-17 10:06:35 UTC
With:
$ g++-4.5 -v
Using built-in specs.
COLLECT_GCC=g++-4.5
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.5.1-12' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.5.2 20101210 (prerelease) (Debian 4.5.1-12) 

Create the following error
In file included from sci_gateway/cpp/sci_parallel_run.cpp:44:0:
./src/cpp/parallel_run.hxx: In function '<built-in>':
./src/cpp/parallel_run.hxx:314:21: internal compiler error: in change_scope, at cfglayout.c:429
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.

Note that using -v or -save-temps fixes the issue.

If it helps, the result with the verbose mode:
$ make CXX="g++-4.5" CXXFLAGS="-v"
/bin/bash ../../libtool  --tag=CXX   --mode=compile g++-4.5 -DHAVE_CONFIG_H -I. -I../../modules/core/includes  -fopenmp -I../../libs/MALLOC/includes/ -I./includes/ -I../../modules/core/includes -I./src/cpp/ -I../../modules/api_scilab/includes -I../../modules/output_stream/includes -I../../modules/parameters/includes -I../../modules/dynamic_link/includes -fprofile-arcs -ftest-coverage -DNDEBUG -fno-stack-protector -I../../modules/core/includes/ -I../../libs/MALLOC/includes/ -I../../modules/localization/includes/  -v -MT libsciparallel_la-sci_parallel_run.lo -MD -MP -MF .deps/libsciparallel_la-sci_parallel_run.Tpo -c -o libsciparallel_la-sci_parallel_run.lo `test -f 'sci_gateway/cpp/sci_parallel_run.cpp' || echo './'`sci_gateway/cpp/sci_parallel_run.cpp
libtool: compile:  g++-4.5 -DHAVE_CONFIG_H -I. -I../../modules/core/includes -fopenmp -I../../libs/MALLOC/includes/ -I./includes/ -I../../modules/core/includes -I./src/cpp/ -I../../modules/api_scilab/includes -I../../modules/output_stream/includes -I../../modules/parameters/includes -I../../modules/dynamic_link/includes -fprofile-arcs -ftest-coverage -DNDEBUG -fno-stack-protector -I../../modules/core/includes/ -I../../libs/MALLOC/includes/ -I../../modules/localization/includes/ -v -MT libsciparallel_la-sci_parallel_run.lo -MD -MP -MF .deps/libsciparallel_la-sci_parallel_run.Tpo -c sci_gateway/cpp/sci_parallel_run.cpp  -fPIC -DPIC -o .libs/libsciparallel_la-sci_parallel_run.o
Using built-in specs.
COLLECT_GCC=g++-4.5
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.5.1-12' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.5.2 20101210 (prerelease) (Debian 4.5.1-12) 
COLLECT_GCC_OPTIONS='-DHAVE_CONFIG_H' '-I.' '-I../../modules/core/includes' '-fopenmp' '-I../../libs/MALLOC/includes/' '-I./includes/' '-I../../modules/core/includes' '-I./src/cpp/' '-I../../modules/api_scilab/includes' '-I../../modules/output_stream/includes' '-I../../modules/parameters/includes' '-I../../modules/dynamic_link/includes' '-fprofile-arcs' '-ftest-coverage' '-DNDEBUG' '-fno-stack-protector' '-I../../modules/core/includes/' '-I../../libs/MALLOC/includes/' '-I../../modules/localization/includes/' '-v' '-MT' 'libsciparallel_la-sci_parallel_run.lo' '-MD' '-MP' '-MF' '.deps/libsciparallel_la-sci_parallel_run.Tpo' '-c' '-fPIC' '-DPIC' '-o' '.libs/libsciparallel_la-sci_parallel_run.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-pthread'
 /usr/lib/gcc/x86_64-linux-gnu/4.5.2/cc1plus -quiet -v -I. -I../../modules/core/includes -I../../libs/MALLOC/includes/ -I./includes/ -I../../modules/core/includes -I./src/cpp/ -I../../modules/api_scilab/includes -I../../modules/output_stream/includes -I../../modules/parameters/includes -I../../modules/dynamic_link/includes -I../../modules/core/includes/ -I../../libs/MALLOC/includes/ -I../../modules/localization/includes/ -MD .libs/libsciparallel_la-sci_parallel_run.d -MF .deps/libsciparallel_la-sci_parallel_run.Tpo -MP -MT libsciparallel_la-sci_parallel_run.lo -D_GNU_SOURCE -D_REENTRANT -DHAVE_CONFIG_H -DNDEBUG -DPIC sci_gateway/cpp/sci_parallel_run.cpp -quiet -dumpbase sci_parallel_run.cpp -mtune=generic -march=x86-64 -auxbase-strip .libs/libsciparallel_la-sci_parallel_run.o -version -fopenmp -fprofile-arcs -ftest-coverage -fno-stack-protector -fPIC -o /tmp/ccYzJ764.s
GNU C++ (Debian 4.5.1-12) version 4.5.2 20101210 (prerelease) (x86_64-linux-gnu)
	compiled by GNU C version 4.5.2 20101210 (prerelease), GMP version 4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.5.2/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
ignoring duplicate directory "../../modules/core/includes"
ignoring duplicate directory "../../modules/core/includes/"
ignoring duplicate directory "../../libs/MALLOC/includes/"
#include "..." search starts here:
#include <...> search starts here:
 .
 ../../modules/core/includes
 ../../libs/MALLOC/includes/
 ./includes/
 ./src/cpp/
 ../../modules/api_scilab/includes
 ../../modules/output_stream/includes
 ../../modules/parameters/includes
 ../../modules/dynamic_link/includes
 ../../modules/localization/includes/
 /usr/include/c++/4.5
 /usr/include/c++/4.5/x86_64-linux-gnu
 /usr/include/c++/4.5/backward
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.5.2/include
 /usr/lib/gcc/x86_64-linux-gnu/4.5.2/include-fixed
 /usr/include
End of search list.
GNU C++ (Debian 4.5.1-12) version 4.5.2 20101210 (prerelease) (x86_64-linux-gnu)
	compiled by GNU C version 4.5.2 20101210 (prerelease), GMP version 4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 7a8433120169a9d632f7a440dcb8b4b4
sci_gateway/cpp/sci_parallel_run.cpp: In member function 'int<unnamed>::wrapper::getFunction(int*)':
sci_gateway/cpp/sci_parallel_run.cpp:565:17: warning: deprecated conversion from string constant to 'char*'
COLLECT_GCC_OPTIONS='-DHAVE_CONFIG_H' '-I.' '-I../../modules/core/includes' '-fopenmp' '-I../../libs/MALLOC/includes/' '-I./includes/' '-I../../modules/core/includes' '-I./src/cpp/' '-I../../modules/api_scilab/includes' '-I../../modules/output_stream/includes' '-I../../modules/parameters/includes' '-I../../modules/dynamic_link/includes' '-fprofile-arcs' '-ftest-coverage' '-DNDEBUG' '-fno-stack-protector' '-I../../modules/core/includes/' '-I../../libs/MALLOC/includes/' '-I../../modules/localization/includes/' '-v' '-MT' 'libsciparallel_la-sci_parallel_run.lo' '-MD' '-MP' '-MF' '.deps/libsciparallel_la-sci_parallel_run.Tpo' '-c' '-fPIC' '-DPIC' '-o' '.libs/libsciparallel_la-sci_parallel_run.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-pthread'
 as -V -Qy --64 -o .libs/libsciparallel_la-sci_parallel_run.o /tmp/ccYzJ764.s
GNU assembler version 2.20.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Debian) 2.20.1-system.20100303
Comment 1 Sylvestre Ledru 2010-12-17 14:40:30 UTC
Created attachment 22797 [details]
sci_parallel_run.ii


I have been able to reproduce this issue with -v or -save-temps
Comment 2 Sylvestre Ledru 2010-12-17 14:41:11 UTC
Created attachment 22798 [details]
sci_parallel_run.s