From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id ECB683858D20 for ; Wed, 17 Apr 2024 14:40:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ECB683858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ECB683858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713364804; cv=none; b=gNf14/zfe2L+ddBNfbyMrrBSiYmISBnWlKt7SakXNR95HzWpKaLXlNpGEZ9IkYYbWvCc/2vo/UOcxQ2Cd6TyjtCSv4YwnC8KX2o08bp5r9pVym+Z8tCPqRPVYIgVUN80djSZxEsbbxHiNyMeAhtwWaHi7Tgz116Yw+mh8LlHHyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713364804; c=relaxed/simple; bh=j5DX6vGtBWjtOfi7FUNgzXN2NFZpQVER7gg7qZYOdfQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=MdrQAUgT2CAkrshi0OahVy0WeT9H4zTKclu5KBNISuAwX6gRuAyG/t4aRvF/dwWKGtXtpGEdFaSVMWpk847vL2hJLmbdUapiKxf7qw2GO0WjCF1OLOxlxsYUqFnbG9s1c98zJgynknKMp1u+0/qjOHmhuBBliPT+2+aXPTK5ZnI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713364802; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=yM9bjJJdE+Vae+bGcRei2GXWS5KBa10Po4qsfGCAfr4=; b=Q7WRU8ZokIj4QrkDaE76Ity9roNq4K/0ZfzXr9rWShDQ5d99sjkUEMdhlL9+XQgEhi3wvu exn4NWgVeiwN32aUaaK7pyGEl7cYUhp5XYz2RWHRQZKoR6z2t0WpIY4+aylDVu9t9K2hHF MlLsPX4QYuRJdo5jUvXexqB2i5yI6aU= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-4pcA3MugOdCuKcZyqrppsg-1; Wed, 17 Apr 2024 10:39:59 -0400 X-MC-Unique: 4pcA3MugOdCuKcZyqrppsg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EE4051E441C5; Wed, 17 Apr 2024 14:39:58 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF4761C060A6; Wed, 17 Apr 2024 14:39:58 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 43HEdrsL2664976 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 17 Apr 2024 16:39:53 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 43HEdqga2664975; Wed, 17 Apr 2024 16:39:52 +0200 Date: Wed, 17 Apr 2024 16:39:52 +0200 From: Jakub Jelinek To: Jan Hubicka Cc: Jason Merrill , Richard Biener , Patrick Palka , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] c++: Retry the aliasing of base/complete cdtor optimization at import_export_decl time [PR113208] Message-ID: Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Apr 17, 2024 at 04:34:07PM +0200, Jan Hubicka wrote: > I think for most scenarios this is OK, but I am not sure about > incremental linking (both LTO and non-LTO). What seems wrong is that we > produce C5 comdat that is not exporting what it should and thus breaking > the invariant that in valid code all comdats of same name are > semantically equivalent. Yeah, exactly. That is what I'm worried about too. > Perhaps it makes no difference since this > scenario is pretty special and we know that the functions are > semantically equivalent and their addresses are never compared for > equality (at least I failed to produce some useful testcase). Yes, I think one can't take address of a constructor/destructor and compare that for equality; I guess the destructor address can be stored in vtables, but code manually reading stuff from vtables and assuming pointer equality is almost certainly not valid. Jakub