Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 38202
Product:  
Component:  
Status: UNCONFIRMED
Resolution:
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Eric Weddington <eric.weddington@atmel.com>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 38202 depends on: Show dependency tree
Show dependency graph
Bug 38202 blocks:

Additional Comments:






Mark bug as waiting for feedback



    

    

View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2008-11-20 16:13
New test gcc.dg/torture/pr37868.c fails for -O[0123s] with:

/usr/local/avrdev/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr37868.c:8: error:
width of 'a' exceeds its type

/usr/local/avrdev/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr37868.c:9: error:
width of 'b' exceeds its type


The test contains these declarations:
struct X {
  unsigned char pad : 4;
  unsigned int a : 32;
  unsigned int b : 24;
  unsigned int c : 6;
} __attribute__((packed));

An int on the AVR is 16-bits, hence the width of 'a' and 'b' exceed their type.

------- Comment #1 From Eric Weddington 2008-11-20 16:14 -------
Test was added by:

2008-11-20  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/37868
        * gcc.dg/torture/pr37868.c: New testcase.
        * gcc.c-torture/execute/pr38048-1.c: Likewise.
        * gcc.c-torture/execute/pr38048-2.c: Likewise.

------- Comment #2 From abni 2009-08-06 11:13 -------
gcc.dg/torture/pr37868.c should report the error..This is the positive test
case for avr-gcc as the size of int = 16 bits,and in the struct X int bit field
width is >16

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug