Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:verhaegs:branches:home:verhaegs:amixdev
ppc-morphos-gcc
0005-pr45112.diff.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0005-pr45112.diff.patch of Package ppc-morphos-gcc
From d5b7d1417ce27e5e27c0802bea20c9eed5fee6b1 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski <marek@amiga.pl> Date: Sun, 31 Oct 2010 15:20:08 +0100 Subject: [PATCH] pr45112.diff --- gcc/cp/decl.c | 4 ++++ gcc/testsuite/g++.dg/pr45112.C | 12 ++++++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) create mode 100644 gcc/testsuite/g++.dg/pr45112.C diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 6f20876..ab47151 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2068,6 +2068,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) SET_DECL_INIT_PRIORITY (olddecl, DECL_INIT_PRIORITY (newdecl)); DECL_HAS_INIT_PRIORITY_P (olddecl) = 1; } + /* Likewise for DECL_USER_ALIGN and DECL_PACKED. */ + DECL_USER_ALIGN (olddecl) = DECL_USER_ALIGN (newdecl); + if (TREE_CODE (newdecl) == FIELD_DECL) + DECL_PACKED (olddecl) = DECL_PACKED (newdecl); /* The DECL_LANG_SPECIFIC information in OLDDECL will be replaced with that from NEWDECL below. */ diff --git a/gcc/testsuite/g++.dg/pr45112.C b/gcc/testsuite/g++.dg/pr45112.C new file mode 100644 index 0000000..34dd3e1 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr45112.C @@ -0,0 +1,12 @@ +/* { dg-do compile } */ + +struct JSString +{ + unsigned char mLength; + static JSString unitStringTable[]; +}; + +JSString JSString::unitStringTable[] __attribute__ ((aligned (8))) = { 1 }; + +int bug [__alignof__ (JSString::unitStringTable) >= 8 ? 1 : -1]; + -- 1.5.6.5
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor