From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 39706386195C; Tue, 14 Jul 2020 10:53:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39706386195C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1594724039; bh=/rzrZULMScle3b5WXcWQE5jwgaKEuP2lUrRj3qLUYiw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YZJyMMvEtHIODBXmovC47AhbC57rCG4KYmrei56wKC3t7NtCVJ9yAMx24vtoH5lcA cj8/VpwYgAxrdxJ6SANJfCvuf0HF5bpiz+GifnttAdeF3QBeDRmQ1mDMGMUG2aRYRa VQD49Wp6q3orD6DSgEzmDHXwiGV83DmZOnO8U2TI= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/96194] 10.1.1: ICE in assign_temp, at function.c:984 during RTL pass: expand Date: Tue, 14 Jul 2020 10:53:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc everconfirmed bug_status cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2020 10:53:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96194 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2020-07-14 --- Comment #1 from Jakub Jelinek --- Reduced testcase: typedef decltype (sizeof 0) size_t; void *operator new (size_t, void *b) { return b; } struct A { ~A (); }; struct B : A { float e[64]; }; void * foo (void *x, bool y) { void *p =3D y ? x : nullptr; return new (p) B (); } (the nullptr is from: static inline void * os_malloc_aligned(size_t size, size_t alignment) { void *ptr; alignment =3D (alignment + sizeof(void*) - 1) & ~(sizeof(void*) - 1); if(posix_memalign(&ptr, alignment, size) !=3D 0) return NULL; return ptr; } ) and jump threading makes return new (nullptr) B (); out of this. typedef decltype (sizeof 0) size_t; void *operator new (size_t, void *b) { return b; } struct A { ~A (); }; struct B : A { float e[64]; }; void * foo () { return new (nullptr) B (); } ICEs too.=