From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 862 invoked by alias); 14 Feb 2014 17:13:14 -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 802 invoked by uid 48); 14 Feb 2014 17:13:05 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/60175] ICE on gcc.dg/asan/nosanitize-and-inline.c Date: Fri, 14 Feb 2014 17:13:00 -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: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 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: 2014-02/txt/msg01338.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60175 --- Comment #8 from Jakub Jelinek --- The incorrect frequencies can be seen even on say -O1 -fsanitize=address -fdump-rtl-expand-all: static void *stack_base; void mark_memory (void **start, void **end); int main (void) { void *dummy; stack_base = &dummy; void *end; mark_memory (stack_base, &end); return 0; } I don't see anything wrong before find_many_sub_blocks is called, there are just 3 basic blocks at that point, bb3 as entry block successor with freq 10000, which has some asan related branches inside of it, but nothing outside, then bb2 as the function body block with freq 10000, which ends in an unconditional jump that jumps to return_label (in bb4 after note + 2 clobbers), and finally bb4 as the exit block predecessor with freq 10000. I guess the only weird thing is that the clobbers are bypassed by the jump, maybe that in the end causes find_many_sub_blocks to create weird frequencies. And bb4 contains again some conditional jumps and labels related to asan, but again only inside that block. Without asan use-after-return, the exit block predecessor is just merged with the preceeding basic block, maybe it has a wrong frequency after find_many_sub_blocks too, but as it is merged with the body block, tha twrong frequency never shows up anywhere.