From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19871 invoked by alias); 7 Nov 2013 10:11:40 -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 19801 invoked by uid 48); 7 Nov 2013 10:11:37 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/59029] ICE with builtin function and -fsanitize=address Date: Thu, 07 Nov 2013 10:11:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.4 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: 2013-11/txt/msg00585.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59029 --- Comment #3 from Jakub Jelinek --- (In reply to Yury Gribov from comment #2) > Created attachment 31177 [details] > Draft patch > > Aha, looks like the ICE is caused by destination address being INTEGER_CST > instead of ADDR_EXPR. Attached patch seems to fix this (tested on x86_64). > > @Volker: could you add your testcase to Asan testsuite? Patch preapproved with the testcase and correct ChangeLog, just add /* { dg-do compile } */ int foo () { return __sync_fetch_and_add ((int *) 0, 1); } to testsuite/c-c++-common/asan/pr59029.c ?