This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/26732] New: Rejects valid code at different optimization levels.
- From: "ramana dot radhakrishnan at codito dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2006 18:41:41 -0000
- Subject: [Bug c/26732] New: Rejects valid code at different optimization levels.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
#include <stdlib.h>
int
bar(baz)
struct { int foo; } baz;
{
return baz.foo;
}
int main (void)
{
struct { int foo; } baz;
baz.foo = 0xdeadbeef;
if (bar(baz) != 0xdeadbeef)
abort();
}
Compiling at O2 results in no error.
compiling at O3 results in the following error :
fail.c:35: error: incompatible type for argument 1 of 'bar'
This is a regression from 3.4.x .Have not checked this for mainline yet.
--
Summary: Rejects valid code at different optimization levels.
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ramana dot radhakrishnan at codito dot com
GCC host triplet: i686-linux-gnu
GCC target triplet: arm-none-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26732