From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22140 invoked by alias); 22 Apr 2008 13:51:38 -0000 Received: (qmail 20966 invoked by uid 48); 22 Apr 2008 13:50:50 -0000 Date: Tue, 22 Apr 2008 13:51:00 -0000 Subject: [Bug c/36008] New: Function produces wrong results when inlined. X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "xavier at tddft dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-04/txt/msg01547.txt.bz2 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