From patchwork Mon May 27 12:35:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 246591 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 19FA12C02E9 for ; Mon, 27 May 2013 22:35:30 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=AtW4nn2UzLnABYr2LTqYkhxwwhj8p7ROqWUEUTyb0VqyPt UKW24ll2XGpaR0N+4S0j3y4wD6py7As6DiCXtAko1mrQr9Nz0mN2FHtDW8G6x3Ep L5nx2L59MdQa/vnsO2d5tmYhKBi4f6KoCwcZClzyRDRvIKwUXQhG+OPZV9l0U= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=jr2/Vuq5jf++SNz8tAcZ9gws2HM=; b=k7tMoZTkfiCqM37vKe7b vugPeXpprDVsElbGy4tXKT26sL9urfxNV0K/cHkIEU26d4j82W5QAI2yQiwOHYAX D9rJItHnSms52n9AQWZsg0Xjoekur5qzObCFn3PrmhOo/pwvqg+7DiEWJxGQqJ9D EB4Gshjci6vvLSVFE0gteW4= Received: (qmail 27514 invoked by alias); 27 May 2013 12:35:24 -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 27483 invoked by uid 89); 27 May 2013 12:35:21 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from mx02.qsc.de (HELO mx02.qsc.de) (213.148.130.14) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 27 May 2013 12:35:14 +0000 Received: from archimedes.net-b.de (port-92-195-106-97.dynamic.qsc.de [92.195.106.97]) by mx02.qsc.de (Postfix) with ESMTP id C355C25351; Mon, 27 May 2013 14:35:10 +0200 (CEST) Message-ID: <51A352FE.5060106@net-b.de> Date: Mon, 27 May 2013 14:35:10 +0200 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: gcc patches , gfortran Subject: [Patch, Fortran] Mark intrinsics called by the finalization wrapper as attr.artificial X-Virus-Found: No Testing showed that the finalization wrapper caused errors of the kind: Error: The intrinsic '_F.rank' declared INTRINSIC at (1) is not available in the current standard settings but new in TS 29113. Use an appropriate -std=* option or enable -fall-intrinsics in order to use it. That's fixed by the attached patch, which I have committed as obvious (Rev. 199355). (I have a test case, which depends on a not yet submitted patch. The artificial cannot interfere with user functions as GFC_PREFIX gives a symtree which cannot interfere with a normal Fortran name.) Tobias Index: gcc/fortran/ChangeLog =================================================================== --- gcc/fortran/ChangeLog (Revision 199354) +++ gcc/fortran/ChangeLog (Arbeitskopie) @@ -1,3 +1,8 @@ +2013-05-27 Tobias Burnus + + * expr.c (gfc_build_intrinsic_call): Make symbol as attr.artificial. + * intrinsic.c (gfc_is_intrinsic): Disable std check for those. + 2013-05-22 Tobias Burnus * resolve.c (get_temp_from_expr): Change mangling to Index: gcc/fortran/expr.c =================================================================== --- gcc/fortran/expr.c (Revision 199354) +++ gcc/fortran/expr.c (Arbeitskopie) @@ -4657,6 +4657,7 @@ gfc_build_intrinsic_call (gfc_namespace *ns, gfc_i result->symtree->n.sym->intmod_sym_id = id; result->symtree->n.sym->attr.flavor = FL_PROCEDURE; result->symtree->n.sym->attr.intrinsic = 1; + result->symtree->n.sym->attr.artificial = 1; va_start (ap, numarg); atail = NULL; Index: gcc/fortran/intrinsic.c =================================================================== --- gcc/fortran/intrinsic.c (Revision 199354) +++ gcc/fortran/intrinsic.c (Arbeitskopie) @@ -1046,7 +1046,8 @@ gfc_is_intrinsic (gfc_symbol* sym, int subroutine_ return false; /* See if this intrinsic is allowed in the current standard. */ - if (!gfc_check_intrinsic_standard (isym, &symstd, false, loc)) + if (!gfc_check_intrinsic_standard (isym, &symstd, false, loc) + && !sym->attr.artificial) { if (sym->attr.proc == PROC_UNKNOWN && gfc_option.warn_intrinsics_std)