public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/26732]  New: Rejects valid code at different optimization levels.
@ 2006-03-17 18:41 ramana dot radhakrishnan at codito dot com
  2006-03-17 18:43 ` [Bug c/26732] Accepts invalid " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ramana dot radhakrishnan at codito dot com @ 2006-03-17 18:41 UTC (permalink / raw)
  To: gcc-bugs

#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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c/26732] Accepts invalid code at different optimization levels.
  2006-03-17 18:41 [Bug c/26732] New: Rejects valid code at different optimization levels ramana dot radhakrishnan at codito dot com
@ 2006-03-17 18:43 ` pinskia at gcc dot gnu dot org
  2006-03-17 18:45 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-17 18:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-03-17 18:43 -------
This is invalid code, well undefined at best.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26732


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c/26732] Accepts invalid code at different optimization levels.
  2006-03-17 18:41 [Bug c/26732] New: Rejects valid code at different optimization levels ramana dot radhakrishnan at codito dot com
  2006-03-17 18:43 ` [Bug c/26732] Accepts invalid " pinskia at gcc dot gnu dot org
@ 2006-03-17 18:45 ` pinskia at gcc dot gnu dot org
  2006-03-17 18:47 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-17 18:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-03-17 18:45 -------
Related to PR 22249.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26732


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c/26732] Accepts invalid code at different optimization levels.
  2006-03-17 18:41 [Bug c/26732] New: Rejects valid code at different optimization levels ramana dot radhakrishnan at codito dot com
  2006-03-17 18:43 ` [Bug c/26732] Accepts invalid " pinskia at gcc dot gnu dot org
  2006-03-17 18:45 ` pinskia at gcc dot gnu dot org
@ 2006-03-17 18:47 ` pinskia at gcc dot gnu dot org
  2006-03-17 19:49 ` joseph at codesourcery dot com
  2006-04-30  7:39 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-17 18:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-03-17 18:47 -------
This is all:
http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00772.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26732


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c/26732] Accepts invalid code at different optimization levels.
  2006-03-17 18:41 [Bug c/26732] New: Rejects valid code at different optimization levels ramana dot radhakrishnan at codito dot com
                   ` (2 preceding siblings ...)
  2006-03-17 18:47 ` pinskia at gcc dot gnu dot org
@ 2006-03-17 19:49 ` joseph at codesourcery dot com
  2006-04-30  7:39 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: joseph at codesourcery dot com @ 2006-03-17 19:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from joseph at codesourcery dot com  2006-03-17 19:48 -------
Subject: Re:  Accepts invalid code at different optimization
 levels.

Bug 16876 is a related case.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26732


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c/26732] Accepts invalid code at different optimization levels.
  2006-03-17 18:41 [Bug c/26732] New: Rejects valid code at different optimization levels ramana dot radhakrishnan at codito dot com
                   ` (3 preceding siblings ...)
  2006-03-17 19:49 ` joseph at codesourcery dot com
@ 2006-04-30  7:39 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-30  7:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-04-30 07:39 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-04-30 07:39:03
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26732


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-04-30  7:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-17 18:41 [Bug c/26732] New: Rejects valid code at different optimization levels ramana dot radhakrishnan at codito dot com
2006-03-17 18:43 ` [Bug c/26732] Accepts invalid " pinskia at gcc dot gnu dot org
2006-03-17 18:45 ` pinskia at gcc dot gnu dot org
2006-03-17 18:47 ` pinskia at gcc dot gnu dot org
2006-03-17 19:49 ` joseph at codesourcery dot com
2006-04-30  7:39 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).