From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23638 invoked by alias); 13 Dec 2014 21:12:41 -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 23608 invoked by uid 48); 13 Dec 2014 21:12:36 -0000 From: "gcc at breakpoint dot cc" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/64294] invalid code, zero check gets optimized away Date: Sat, 13 Dec 2014 21:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gcc at breakpoint dot cc 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: bug_status resolution 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-12/txt/msg01569.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64294 Sebastian Andrzej Siewior changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID |--- --- Comment #5 from Sebastian Andrzej Siewior --- I re-open it. This time I attached the whole .i twice: - "macro" contains the second CLI_ISCONTAINED() invocation as a macro - "static" contains the second CLI_ISCONTAINED() as a static function The first one (macro) segfaults, the second one (static) works as a expected. The only obvious change I made in the static version is that the size argument is not signed but unsigned. Changing the type of sb_size to signed int results in the segfault again. I saw this problem with gcc-4.8 and 4.9. gcc 4.7 seems not to miss compile it. Comparing the disassemble between those two .i I see: - macro + static