From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47834 invoked by alias); 2 Jun 2015 11:34:44 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 47824 invoked by uid 89); 2 Jun 2015 11:34:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f169.google.com Received: from mail-ob0-f169.google.com (HELO mail-ob0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 02 Jun 2015 11:34:42 +0000 Received: by obbnx5 with SMTP id nx5so124946203obb.0 for ; Tue, 02 Jun 2015 04:34:40 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.48.194 with SMTP id w185mr21101257oiw.95.1433244880312; Tue, 02 Jun 2015 04:34:40 -0700 (PDT) Received: by 10.60.147.170 with HTTP; Tue, 2 Jun 2015 04:34:40 -0700 (PDT) In-Reply-To: References: Date: Tue, 02 Jun 2015 11:52:00 -0000 Message-ID: Subject: Re: C++ PATCH for c++/44282 (ia32 calling convention attributes and mangling) From: Uros Bizjak To: "gcc-patches@gcc.gnu.org" Cc: Jason Merrill Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-06/txt/msg00186.txt.bz2 On Tue, Jun 2, 2015 at 1:03 PM, Uros Bizjak wrote: > On Tue, Jun 2, 2015 at 9:26 AM, Uros Bizjak wrote: >> Hello! >> >>> PR c++/44282 >>> gcc/cp/ >>> * mangle.c (attr_strcmp): New. >>> (write_CV_qualifiers_for_type): Also write out attributes that >>> affect type identity. >>> (write_type): Strip all attributes after writing qualifiers. >>> libiberty/ >>> * cp-demangle.c (cplus_demangle_type): Handle arguments to vendor >>> extended qualifier. >> >> +++ b/gcc/testsuite/g++.dg/abi/mangle-regparm.C >> @@ -0,0 +1,29 @@ >> +// { dg-do run { target i?86-*-* } } >> >> This should read: >> >> +// { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } >> >> The test wasn't actually run on x86_64-linux target. I'll commit the >> following patch after regtest: > > Unfortunately, something is wrong with the testcase itself: > > FAIL: g++.dg/abi/mangle-regparm.C -std=c++98 (test for excess errors) > WARNING: g++.dg/abi/mangle-regparm.C -std=c++98 compilation failed to > produce executable > FAIL: g++.dg/abi/mangle-regparm.C -std=c++11 (test for excess errors) > WARNING: g++.dg/abi/mangle-regparm.C -std=c++11 compilation failed to > produce executable > FAIL: g++.dg/abi/mangle-regparm.C -std=c++14 (test for excess errors) > WARNING: g++.dg/abi/mangle-regparm.C -std=c++14 compilation failed to > produce executable > > with the following error: > > FAIL: g++.dg/abi/mangle-regparm.C -std=c++98 (test for excess errors) > Excess errors: > /usr/bin/ld: /tmp/ccU8LttY.o: bad reloc symbol index (0x5b550 >= 0x12) > for offset 0x6c in section `.text' > /tmp/ccU8LttY.o: could not read symbols: Bad value > > WARNING: g++.dg/abi/mangle-regparm.C -std=c++98 compilation failed to > produce executable > g++.dg/abi/mangle-regparm.C -std=c++98 : output file does not exist > UNRESOLVED: g++.dg/abi/mangle-regparm.C -std=c++98 scan-assembler > _Z18IndirectExternCallIPU7stdcallU7regparmILi3EEFviiEiEvT_T0_S3_ FYI, everything links and runs OK if .set is removed from the following part of the asm: .LFE4: .size _Z18IndirectExternCallIPU7stdcallU7regparmILi3EEFviiEiEvT_T0_S3_, .-_Z18IndirectExternCallIPU7stdcallU7regparmILi3EEFviiEiEvT_T0_S3_ .weak _Z18IndirectExternCallIPFviiEiEvT_T0_S3_ .set _Z18IndirectExternCallIPFviiEiEvT_T0_S3_,_Z18IndirectExternCallIPU7stdcallU7regparmILi3EEFviiEiEvT_T0_S3_ .section .text._Z18IndirectExternCallIPFviiEiEvT_T0_S3_,"axG",@progbits,_Z18IndirectExternCallIPFviiEiEvT_T0_S3_,comdat .weak _Z18IndirectExternCallIPFviiEiEvT_T0_S3_ .type _Z18IndirectExternCallIPFviiEiEvT_T0_S3_, @function _Z18IndirectExternCallIPFviiEiEvT_T0_S3_: Uros.