From patchwork Tue Dec 6 13:42:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Vehreschild X-Patchwork-Id: 86834 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2020457qgi; Tue, 6 Dec 2016 05:43:21 -0800 (PST) X-Received: by 10.84.140.3 with SMTP id 3mr136258478pls.61.1481031801071; Tue, 06 Dec 2016 05:43:21 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id q2si19549163plh.215.2016.12.06.05.43.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Dec 2016 05:43:21 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-443591-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-443591-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-443591-patch=linaro.org@gcc.gnu.org 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:cc:subject:message-id:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=bnZN6GTp2R7sCX9U Mg0qug0lI6ZxX17EgHWlvJ0VZgdP29XUMmSXa0z0JAG0HIBdYpqWYGgDh825oF+W jOV1O9MkTruQ0Qx1wSeY5RIwchp+xB2dwGSjWhpHdMQY5hYwQlEpFdikCWSiXTM7 jiKZH1JHWEMz8wtBc/d9niQQdVY= 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:cc:subject:message-id:in-reply-to:references :mime-version:content-type; s=default; bh=coEcFSOierJVTZc7zW0ZOk WNK+g=; b=fFXLbli16al45vPboGIxTZ5G/T7LZKutywEHD6LxV5zIjQbXVbIJ0h Zva6pP6P7s/+67Iy7RTyBt+zOyJWiK3q37Kxu6pvj51AdM7NRzM6ZfUsKE8WC1MQ Z0wzl6vHNWSnmDm9qiJeT6j0ziNyAOHnozhrOYmCyCllv8Ngm/S2U= Received: (qmail 12285 invoked by alias); 6 Dec 2016 13:42:57 -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 12215 invoked by uid 89); 6 Dec 2016 13:42:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 spammy=U*nathan, nathanacmorg, nathan@acm.org, D*acm.org X-Spam-User: qpsmtpd, 2 recipients X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.17.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Dec 2016 13:42:46 +0000 Received: from vepi2 ([92.76.205.227]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MELdk-1cTiUT1UFc-00FRaT; Tue, 06 Dec 2016 14:42:41 +0100 Date: Tue, 6 Dec 2016 14:42:40 +0100 From: Andre Vehreschild To: Thomas Koenig Cc: GCC-Patches-ML , GCC-Fortran-ML Subject: Re: [Patch, fortran, RFC] Add warning for missing location information Message-ID: <20161206144240.03c8014e@vepi2> In-Reply-To: <20161205190232.178dbc86@vepi2> References: <4969b391-c8ec-4eb4-1cb7-d43d0013834d@netcologne.de> <20161203171604.GB92438@troutmask.apl.washington.edu> <5a0bf188-4718-75c7-2db8-0ddfcc92193d@netcologne.de> <20161205190232.178dbc86@vepi2> MIME-Version: 1.0 X-UI-Out-Filterresults: notjunk:1; V01:K0:J4Gk4xIBtxI=:RdCIr/LlXqXUWfWVuKqCW0 GXaK5mcT4OF7BQLBxa5+HKn5RPVAI3YKCjZqvwF0pdLhHYchVG96xKOSUWnSOlQejwbMXDF4M PVErxrTOcYsE5yJJm77HfQ9lEqfJcijR0uPIv+tjUEGNkycCyYhbDnxf4PnjvoVDAhb4twjxT cYnmKSHt2yrBboJCUCh/w2z4unXVMU5qTuYsO57RU0m2YlMIGLuletLDKPsACIB0JfhfTgrK0 ooUmRxqMnuAin71qFpXJ9n+yiwLLDjqqJTIdVjcq/CilZ1riOgkfjXD53mTzouOQ9uvtwgTjx F8Wn1QpraFSCfosijrx9IOfY8rBLqJPaJggcyqaYQGbs4orjvn/hlF/VLHGbbRa4yGacsACI1 CUrUVJINiEpx78OREKcHc5iuqGL/OJYXunaicERw69ClCZbLdNIZsr4czwmSHmiBIcysFFvPI QC3TyXX5Ck08IvFBt9NXJaG2tBE96WMRGKHuBpqdRPGDERHBXb1q9c3qQazKpdicmkIaepC// S/6fzw+VOeuQqoSeo/ITcTwNxIxezhmmMuVQRCHTomoK7dRBIl2Nt/Xm2l+ZdJdYz9Mh1JiNk anwUXGqszZc1/1hJWwKlEG5d1tBznn2cszaKj0EMR5Tf+uJQFMDYagxv5MeTx+d/VEPUz0u8J sILePfBO0k3kvemXHzVyFBX8TphCRWLJwvmN98DabgCWIQL17oiRpTuiGOMXY+pfsosT4yObB iJW0uy7KUmaH3liSFAO9u3iJig0r4tK58W56E9S35VV0IZN44ryls9K6osU= Hi Thomas, hi all, my part of the patch was okayed by Thomas in the PR at comment #12: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78226#c12 Committed as r243300. Thomas, your part of the patch looks ok to me, too. I haven't tracked the discussion on whether it is ok to add your part of the patch. Therefore I don't have committed your patch. My opinion is, that it does do no harm. So it should be applied. Regards and thanks, Andre On Mon, 5 Dec 2016 19:02:32 +0100 Andre Vehreschild wrote: > Hi Thomas, > > attached patch fixes the remaining open issues on missing locus information > (in class-finalizers, to be precise), at least on my installation for > > make check-fortran > > For libgomp there are still a lot of regressions reported. Given some time I > look into it. > > - Andre > > On Sun, 4 Dec 2016 15:32:21 +0100 > Thomas Koenig wrote: > > > Am 04.12.2016 um 12:40 schrieb Thomas Koenig: > > > > > So, not OK for trunk at the moment. OK once failures have > > > been fixed? > > > > > > This version of the patch actually works (it includes the > > change to gfortran.h). > > > > Regards > > > > Thomas > > -- Andre Vehreschild * Email: vehre ad gmx dot de Index: gcc/fortran/ChangeLog =================================================================== --- gcc/fortran/ChangeLog (Revision 243297) +++ gcc/fortran/ChangeLog (Arbeitskopie) @@ -1,3 +1,12 @@ +2016-12-06 Andre Vehreschild + + PR fortran/78226 + * class.c (finalize_component): Add missing locus information. + (finalization_scalarizer): Likewise. + (finalization_get_offset): Likewise. + (finalizer_insert_packed_call): Likewise. + (generate_finalization_wrapper): Likewise. + 2016-12-05 Nathan Sidwell * error.c (gfc_warning_check): Call diagnostic_check_max_errors. Index: gcc/fortran/class.c =================================================================== --- gcc/fortran/class.c (Revision 243297) +++ gcc/fortran/class.c (Arbeitskopie) @@ -965,6 +965,7 @@ cond->block = gfc_get_code (EXEC_IF); cond->block->expr1 = gfc_get_expr (); cond->block->expr1->expr_type = EXPR_FUNCTION; + cond->block->expr1->where = gfc_current_locus; gfc_get_sym_tree ("associated", sub_ns, &cond->block->expr1->symtree, false); cond->block->expr1->symtree->n.sym->attr.flavor = FL_PROCEDURE; cond->block->expr1->symtree->n.sym->attr.intrinsic = 1; @@ -1077,6 +1078,7 @@ gfc_commit_symbol (expr->symtree->n.sym); expr->ts.type = BT_INTEGER; expr->ts.kind = gfc_index_integer_kind; + expr->where = gfc_current_locus; /* TRANSFER. */ expr2 = gfc_build_intrinsic_call (sub_ns, GFC_ISYM_TRANSFER, "transfer", @@ -1093,6 +1095,7 @@ block->ext.actual->expr->value.op.op1 = expr2; block->ext.actual->expr->value.op.op2 = offset; block->ext.actual->expr->ts = expr->ts; + block->ext.actual->expr->where = gfc_current_locus; /* C_F_POINTER's 2nd arg: ptr -- and its absent shape=. */ block->ext.actual->next = gfc_get_actual_arglist (); @@ -1149,6 +1152,7 @@ expr->ref->u.ar.dimen = 1; expr->ref->u.ar.dimen_type[0] = DIMEN_ELEMENT; expr->ref->u.ar.start[0] = gfc_lval_expr_from_sym (idx2); + expr->where = sizes->declared_at; expr = gfc_build_intrinsic_call (sub_ns, GFC_ISYM_MOD, "mod", gfc_current_locus, 2, @@ -1169,6 +1173,7 @@ expr2->value.op.op2->ref->u.ar.dimen_type[0] = DIMEN_ELEMENT; expr2->value.op.op2->ref->u.ar.start[0] = gfc_get_expr (); expr2->value.op.op2->ref->u.ar.start[0]->expr_type = EXPR_OP; + expr2->value.op.op2->ref->u.ar.start[0]->where = gfc_current_locus; expr2->value.op.op2->ref->u.ar.start[0]->value.op.op = INTRINSIC_MINUS; expr2->value.op.op2->ref->u.ar.start[0]->value.op.op1 = gfc_lval_expr_from_sym (idx2); @@ -1177,6 +1182,7 @@ expr2->value.op.op2->ref->u.ar.start[0]->ts = expr2->value.op.op2->ref->u.ar.start[0]->value.op.op1->ts; expr2->ts = idx->ts; + expr2->where = gfc_current_locus; /* ... * strides(idx2). */ expr = gfc_get_expr (); @@ -1192,6 +1198,7 @@ expr->value.op.op2->ref->u.ar.start[0] = gfc_lval_expr_from_sym (idx2); expr->value.op.op2->ref->u.ar.as = strides->as; expr->ts = idx->ts; + expr->where = gfc_current_locus; /* offset = offset + ... */ block->block->next = gfc_get_code (EXEC_ASSIGN); @@ -1202,6 +1209,7 @@ block->block->next->expr2->value.op.op1 = gfc_lval_expr_from_sym (offset); block->block->next->expr2->value.op.op2 = expr; block->block->next->expr2->ts = idx->ts; + block->block->next->expr2->where = gfc_current_locus; /* After the loop: offset = offset * byte_stride. */ block->next = gfc_get_code (EXEC_ASSIGN); @@ -1213,6 +1221,7 @@ block->expr2->value.op.op1 = gfc_lval_expr_from_sym (offset); block->expr2->value.op.op2 = gfc_lval_expr_from_sym (byte_stride); block->expr2->ts = block->expr2->value.op.op1->ts; + block->expr2->where = gfc_current_locus; return block; } @@ -1422,6 +1431,7 @@ /* Offset calculation for the new array: idx * size of type (in bytes). */ offset2 = gfc_get_expr (); offset2->expr_type = EXPR_OP; + offset2->where = gfc_current_locus; offset2->value.op.op = INTRINSIC_TIMES; offset2->value.op.op1 = gfc_lval_expr_from_sym (idx); offset2->value.op.op2 = gfc_copy_expr (size_expr); @@ -1826,6 +1836,7 @@ block->expr2 = gfc_get_expr (); block->expr2->expr_type = EXPR_OP; block->expr2->value.op.op = INTRINSIC_TIMES; + block->expr2->where = gfc_current_locus; /* sizes(idx-1). */ block->expr2->value.op.op1 = gfc_lval_expr_from_sym (sizes); @@ -1837,6 +1848,7 @@ block->expr2->value.op.op1->ref->u.ar.dimen_type[0] = DIMEN_ELEMENT; block->expr2->value.op.op1->ref->u.ar.start[0] = gfc_get_expr (); block->expr2->value.op.op1->ref->u.ar.start[0]->expr_type = EXPR_OP; + block->expr2->value.op.op1->ref->u.ar.start[0]->where = gfc_current_locus; block->expr2->value.op.op1->ref->u.ar.start[0]->value.op.op = INTRINSIC_MINUS; block->expr2->value.op.op1->ref->u.ar.start[0]->value.op.op1 = gfc_lval_expr_from_sym (idx); @@ -1890,6 +1902,7 @@ block->expr1->value.op.op2->ref->u.ar.dimen_type[0] = DIMEN_ELEMENT; block->expr1->value.op.op2->ref->u.ar.start[0] = gfc_get_expr (); block->expr1->value.op.op2->ref->u.ar.start[0]->expr_type = EXPR_OP; + block->expr1->value.op.op2->ref->u.ar.start[0]->where = gfc_current_locus; block->expr1->value.op.op2->ref->u.ar.start[0]->value.op.op = INTRINSIC_MINUS; block->expr1->value.op.op2->ref->u.ar.start[0]->value.op.op1 = gfc_lval_expr_from_sym (idx); @@ -1927,6 +1940,7 @@ last_code->expr2->value.op.op2 = gfc_get_int_expr (gfc_index_integer_kind, NULL, 1); last_code->expr2->ts = last_code->expr2->value.op.op2->ts; + last_code->expr2->where = gfc_current_locus; last_code->expr2->value.op.op1 = gfc_lval_expr_from_sym (sizes); last_code->expr2->value.op.op1->ref = gfc_get_ref ();