Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 28902
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Rolf Magnus <ramagnus@t-online.de>
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 28902 depends on: Show dependency tree
Show dependency graph
Bug 28902 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2006-09-03 05:30 Opened: 2006-08-30 12:47
The avr target gives that alignment warning for every polymorphic class,
because it doesn't define TARGET_VTABLE_ENTRY_ALIGN, which means the default
kicks in, which is the size of a pointer. Since the AVR as an 8 bit platform
has no alignment requirements, BIGGEST_ALIGNMENT is 8, which is less than the
pointer size. The fix is trivial. A patch against trunk follows:

Index: gcc/config/avr/avr.h
===================================================================
--- gcc/config/avr/avr.h        (revision 116509)
+++ gcc/config/avr/avr.h        (working copy)
@@ -94,6 +94,7 @@
 /* No data type wants to be aligned rounder than this.  */
 #define BIGGEST_ALIGNMENT 8

+#define TARGET_VTABLE_ENTRY_ALIGN 8

 #define STRICT_ALIGNMENT 0

------- Comment #1 From Andrew Pinski 2006-09-03 05:30 -------
Confirmed, can you send your patch to gcc-patches@ as mentioned on 
http://gcc.gnu.org/contribute.html
With all the requested information with the email as requested by that page.

------- Comment #2 From aesok@gcc.gnu.org 2007-09-03 20:35 -------
Subject: Bug 28902

Author: aesok
Date: Mon Sep  3 20:35:10 2007
New Revision: 128059

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128059
Log:
        PR target/28902
        * config/avr/avr.h (TARGET_VTABLE_ENTRY_ALIGN): Define.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/avr/avr.h

------- Comment #3 From aesok@gcc.gnu.org 2007-09-03 21:04 -------
Subject: Bug 28902

Author: aesok
Date: Mon Sep  3 21:03:50 2007
New Revision: 128060

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128060
Log:
        PR target/28902
        * config/avr/avr.h (TARGET_VTABLE_ENTRY_ALIGN): Define.


Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/config/avr/avr.h

------- Comment #4 From aesok@gcc.gnu.org 2007-09-06 21:17 -------
Fixed.

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