This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/24589] New: [4.1 Regression] wrong code with zero sized structs on CONSTRUCTOR


Testcase:
   void abort (void);
   int ii;
   typedef struct {} raw_spinlock_t;

   typedef struct {
     raw_spinlock_t raw_lock;
   } spinlock_t;


   raw_spinlock_t one_raw_spinlock (void)
   {
       raw_spinlock_t raw_lock;
       ii++;
       return raw_lock;
   }

   int main(void)
   {
     spinlock_t lock = (spinlock_t) { .raw_lock = one_raw_spinlock() };
     if (ii != 1)
       abort ();
     return 0;
   }
-------
Forwarded from:
http://gcc.gnu.org/ml/gcc/2005-09/msg00260.html

Patch which needs testing posted:
http://gcc.gnu.org/ml/gcc/2005-09/msg00286.html


-- 
           Summary: [4.1 Regression] wrong code with zero sized structs on
                    CONSTRUCTOR
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]