From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9397 invoked by alias); 27 Jan 2015 12:51:38 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9267 invoked by uid 55); 27 Jan 2015 12:51:25 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/64798] [5 regression] g++.old-deja/g++.eh/badalloc1.C FAILs Date: Tue, 27 Jan 2015 12:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg03084.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64798 --- Comment #14 from rguenther at suse dot de --- On Tue, 27 Jan 2015, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64798 > > --- Comment #13 from Jakub Jelinek --- I > think aligned attribute is similarly useless for this, I'd really go for > testing alignments you need, rather than expecting some magic value. > I'm not aware of any target that would have bigger alignment for say > char/short/int/long than long long, ditto with float/double, so I'd just > check maximum of long long, long double, void * alignment. For the actual bug I can use __alignof__ (__cxa_refcounted_exception), but that again ends up using __attribute__((__aligned__)) via the _Unwind_Exception member: struct _Unwind_Exception { _Unwind_Exception_Class exception_class; _Unwind_Exception_Cleanup_Fn exception_cleanup; #if !defined (__USING_SJLJ_EXCEPTIONS__) && defined (__SEH__) _Unwind_Word private_[6]; #else _Unwind_Word private_1; _Unwind_Word private_2; #endif /* @@@ The IA-64 ABI says that this structure must be double-word aligned. Taking that literally does not make much sense generically. Instead we provide the maximum alignment required by any type for the machine. */ } __attribute__((__aligned__)); so I think that using __attribute__((__aligned__)) is very much the correct and easiest thing to use.