From patchwork Mon Nov 22 03:29:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Davis, Jimmie" X-Patchwork-Id: 72497 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 6F407B6EED for ; Mon, 22 Nov 2010 14:30:11 +1100 (EST) Received: (qmail 26315 invoked by alias); 22 Nov 2010 03:30:06 -0000 Received: (qmail 26296 invoked by uid 22791); 22 Nov 2010 03:30:04 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtap1.systems.smu.edu (HELO smtap1.systems.smu.edu) (129.119.65.148) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Nov 2010 03:29:58 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAOFx6UyBd0GH/2dsb2JhbACiUnGxEIhphUsE Received: from sxht1p4.systems.smu.edu ([129.119.65.135]) by smtah1.systems.smu.edu with ESMTP/TLS/AES128-SHA; 21 Nov 2010 21:29:56 -0600 Received: from SXMB1PG.SYSTEMS.SMU.EDU ([fe80::54f4:609f:2958:17b2]) by SXHT1P4.SYSTEMS.SMU.EDU ([2002:8177:4187::8177:4187]) with mapi; Sun, 21 Nov 2010 21:29:27 -0600 From: "Davis, Jimmie" To: "gcc-patches@gcc.gnu.org" , "fortran@gcc.gnu.org" Subject: [fortran patch] mores testsuite files Date: Mon, 22 Nov 2010 03:29:55 +0000 Message-ID: <00061D6890083E418784FC390A35E43702255D@SXMB1PG.SYSTEMS.SMU.EDU> MIME-Version: 1.0 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 Just some more tests. They all pass. 2010-11-22 Bud Davis * arith_divide_no_check.f ,arith_divide.f,old_style_init.f90: new tests. --bud Index: gcc/gcc/testsuite/gfortran.dg/arith_divide_no_check.f =================================================================== --- gcc/gcc/testsuite/gfortran.dg/arith_divide_no_check.f (revision 0) +++ gcc/gcc/testsuite/gfortran.dg/arith_divide_no_check.f (revision 0) @@ -0,0 +1,17 @@ +! { dg-do compile } +! { dg-options "-fno-range-check" } +! This test executes all code paths in gfc_arith_divide +! when executed along with it's companion test +! arith_divide.f + + implicit none + integer i,j + real a,b + complex c,d + i = 10/40 + j = 10/0! { dg-error "Division by zero at" } + a = 10.0/40.0 + b = 10.0/0.0 + c = (1.0,1.0)/(10.0,40.0) + d = (1.0,10.)/(0.0,0.0) + end Index: gcc/gcc/testsuite/gfortran.dg/arith_divide.f =================================================================== --- gcc/gcc/testsuite/gfortran.dg/arith_divide.f (revision 0) +++ gcc/gcc/testsuite/gfortran.dg/arith_divide.f (revision 0) @@ -0,0 +1,15 @@ +! { dg-do compile } +! This test executes all code paths in gfc_arith_divide +! when executed along with it's companion test +! arith_divide_no_check.f + implicit none + integer i,j + real a,b + complex c,d + i = 10/40 + j = 10/0! { dg-error "Division by zero at" } + a = 10.0/40.0 + b = 10.0/0.0! { dg-error "Division by zero at" } + c = (1.0,1.0)/(10.0,40.0) ! Not division by zero + d = (1.0,10.)/(0.0,0.0)! { dg-error "Division by zero at" } + end Index: gcc/gcc/testsuite/gfortran.dg/old_style_init.f90 =================================================================== --- gcc/gcc/testsuite/gfortran.dg/old_style_init.f90 (revision 0) +++ gcc/gcc/testsuite/gfortran.dg/old_style_init.f90 (revision 0) @@ -0,0 +1,15 @@ +!{ dg-do compile } +! this routine tests all the execution paths +! through the routine known as match_old_style_init() +! it does not make sense in any other context !! + subroutine sub1(Z) !{ dg-error "DATA attribute conflicts" } + integer Z/10/!{ dg-error "DATA"} + end + pure function pi(k) + integer ,intent(in) :: k + integer i / 10 / !{ dg-error "Initialization at " } + pi=3.0 + end function pi + subroutine sub2 + integer I / /!{ dg-error "Syntax error in DATA" } + end