When the attached source file is compiled with 'gcc -O3 -c', the code that uses
it produces wrong results. The problem disappears if 'gcc -O3 -fno-inline -c'
or if the variables inside 'generate_point_symmetry' are declared as 'static'.
This is the output of gcc-4.3 -v :
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.3/configure --prefix=/opt/gcc/ --program-suffix=-4.3
--enable-languages=c,fortran,c++ --with-arch=core2 --enable-libgomp
Thread model: posix
gcc version 4.3.1 20080419 (prerelease) (GCC)
This is the system:
Linux corvo 2.6.24.2-corvo-001 #3 SMP PREEMPT x86_64 GNU/Linux
distribution is Debian GNU/Linux 4.0
--
Summary: Function produces wrong results when inlined.
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: xavier at tddft dot org
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36008