From patchwork Thu Nov 8 10:47:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 994755 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-489327-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="MSV2SDHa"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42rKjk5wqqz9sBZ for ; Thu, 8 Nov 2018 21:47:21 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=hb0cpAuuHMPWVvpEvnAc5vQW5zg5KNoHtOcM1kWrk9/O4AELezSpT XJFDDcXQh/f/R1P9avZy9aELTL9p7I5ChZBgm7KA+fM/p1Q/5rRrE0+UAGCEi8h4 n/L9F3TDZWzuoTBNwbZM91VAKGh5OfWQKBPp3yRa0624oABLo0F9h4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=ep/+JprthsUt04avSFIsnbsYKX0=; b=MSV2SDHaxItezbPONzbH v+ByHDtBKu6hV9bIz0ScTQn88M5bkw3nu3hq0iXIlO8Mw9FKB19GVR6qkAlPf4oN x9L96Cp0WqWhqTAs9v1SIU3c30OCmapo+slWqvgFqM4rgqiXxCp0oCC3rVYPSxZ4 5ba0vCVXzZcUEv9vmAU6ZF8= Received: (qmail 93165 invoked by alias); 8 Nov 2018 10:47:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 93131 invoked by uid 89); 8 Nov 2018 10:47:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Nov 2018 10:47:12 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E511FAEB4 for ; Thu, 8 Nov 2018 10:47:09 +0000 (UTC) Date: Thu, 8 Nov 2018 11:47:09 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR87929 Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Bootstrapped & tested on x86_64-unknown-linux-gnu, applied. Richard. From f3d02105b799975047a51ad80488f9cd928419bf Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 8 Nov 2018 10:22:09 +0100 Subject: [PATCH] fix-pr87929 2018-11-08 Richard Biener PR tree-optimization/87929 * tree-complex.c (expand_complex_comparison): Clean EH. * gcc.dg/pr87929.c: New testcase. diff --git a/gcc/testsuite/gcc.dg/pr87929.c b/gcc/testsuite/gcc.dg/pr87929.c new file mode 100644 index 00000000000..f64f7ada442 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87929.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-fexceptions -fnon-call-exceptions -fsignaling-nans" } */ + +#define complex __complex__ +#define _Complex_I (1.0iF) + +extern void f2c_4d__( complex float *, complex float *); +extern void abort (void); + +void f2c_4c__(void) +{ + complex float x,ret_val; + x = 1234 + 5678 * _Complex_I; + f2c_4d__(&ret_val,&x); + if ( x != ret_val ) abort(); +} diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index 49088081bb0..4bf644f9473 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -1558,6 +1558,8 @@ expand_complex_comparison (gimple_stmt_iterator *gsi, tree ar, tree ai, } update_stmt (stmt); + if (maybe_clean_eh_stmt (stmt)) + gimple_purge_dead_eh_edges (gimple_bb (stmt)); } /* Expand inline asm that sets some complex SSA_NAMEs. */