From patchwork Mon Apr 20 17:25:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 1273583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Yon76JWX; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 495YVp2RnFz9sP7 for ; Tue, 21 Apr 2020 03:25:20 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 37DDF385DC2A; Mon, 20 Apr 2020 17:25:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 37DDF385DC2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587403514; bh=OCy7KIYE02maa5+WVmIJqfEoq3tnoXD/6kuh/PkJZds=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Yon76JWXPNyR8KmOvNS8m4hnXCEAqwc7NHjPz95XAkuRVvRoenEg5c0dpjsg7xHYk 6y4PmCVdtulCG0GKi0rsihCI5dVelPJDEXkw0b+pgjeQpUN0nYEhzO04EW4hP3rTYb oyYx/sKfLuOtlBh+mHJXSW0b06hGc8/65i9bpdoQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from cc-smtpout1.netcologne.de (cc-smtpout1.netcologne.de [IPv6:2001:4dd0:100:1062:25:2:0:1]) by sourceware.org (Postfix) with ESMTPS id 803A83858D31; Mon, 20 Apr 2020 17:25:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 803A83858D31 Received: from cc-smtpin2.netcologne.de (cc-smtpin2.netcologne.de [89.1.8.202]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id 5E42213672; Mon, 20 Apr 2020 19:25:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin2.netcologne.de (Postfix) with ESMTP id 5057911F0E; Mon, 20 Apr 2020 19:25:07 +0200 (CEST) Received: from [2001:4dd7:4da9:0:8f7e:7854:b0d:2bec] (helo=cc-smtpin2.netcologne.de) by localhost with ESMTP (eXpurgate 4.11.6) (envelope-from ) id 5e9ddaf3-4f6f-7f0000012729-7f000001c1a6-1 for ; Mon, 20 Apr 2020 19:25:07 +0200 Received: from linux-p51k.fritz.box (2001-4dd7-4da9-0-8f7e-7854-b0d-2bec.ipv6dyn.netcologne.de [IPv6:2001:4dd7:4da9:0:8f7e:7854:b0d:2bec]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin2.netcologne.de (Postfix) with ESMTPSA; Mon, 20 Apr 2020 19:25:05 +0200 (CEST) To: "fortran@gcc.gnu.org" , gcc-patches Subject: [patch, committed] Add numerous symbol attributes to -fdump-fortran-original Message-ID: Date: Mon, 20 Apr 2020 19:25:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 Content-Language: de-DE X-Spam-Status: No, score=-19.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Thomas Koenig via Gcc-patches From: Thomas Koenig Reply-To: Thomas Koenig Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hello world, after finding myself debug a PR where showing all the attributes of a symbol would have helped enormously (which I realized only afterwards), I went ahead and added most of the flags to show_attr, in the hope that this will help all of us debugging some murky corners of the compiler where attributes are not what they should be. If you see anything that is still missing, please freel free to add. Committed as obvious (no user impact) after testing that the compiler still compiles :-) Regards Thomas 2020-04-20 Thomas Koenig * dump-parse-tree.c (show_attr): Add numerous flags, some cleanup. diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index d324bfd83c0..f32330685e7 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -735,7 +735,7 @@ show_attr (symbol_attribute *attr, const char * module) if (attr->flavor != FL_UNKNOWN) { if (attr->flavor == FL_DERIVED && attr->pdt_template) - fputs (" (PDT template", dumpfile); + fputs (" (PDT-TEMPLATE", dumpfile); else fprintf (dumpfile, "(%s ", gfc_code2string (flavors, attr->flavor)); } @@ -770,6 +770,12 @@ show_attr (symbol_attribute *attr, const char * module) fputs (" LEN", dumpfile); if (attr->pointer) fputs (" POINTER", dumpfile); + if (attr->subref_array_pointer) + fputs (" SUBREF-ARRAY-POINTER", dumpfile); + if (attr->cray_pointer) + fputs (" CRAY-POINTER", dumpfile); + if (attr->cray_pointee) + fputs (" CRAY-POINTEE", dumpfile); if (attr->is_protected) fputs (" PROTECTED", dumpfile); if (attr->value) @@ -791,6 +797,10 @@ show_attr (symbol_attribute *attr, const char * module) fputs (" RESULT", dumpfile); if (attr->entry) fputs (" ENTRY", dumpfile); + if (attr->entry_master) + fputs (" ENTRY-MASTER", dumpfile); + if (attr->mixed_entry_master) + fputs (" MIXED-ENTRY-MASTER", dumpfile); if (attr->is_bind_c) fputs (" BIND(C)", dumpfile); @@ -819,15 +829,80 @@ show_attr (symbol_attribute *attr, const char * module) if (attr->sequence) fputs (" SEQUENCE", dumpfile); + if (attr->alloc_comp) + fputs (" ALLOC-COMP", dumpfile); + if (attr->pointer_comp) + fputs (" POINTER-COMP", dumpfile); + if (attr->proc_pointer_comp) + fputs (" PROC-POINTER-COMP", dumpfile); + if (attr->private_comp) + fputs (" PRIVATE-COMP", dumpfile); + if (attr->zero_comp) + fputs (" ZERO-COMP", dumpfile); + if (attr->coarray_comp) + fputs (" COARRAY-COMP", dumpfile); + if (attr->lock_comp) + fputs (" LOCK-COMP", dumpfile); + if (attr->event_comp) + fputs (" EVENT-COMP", dumpfile); + if (attr->defined_assign_comp) + fputs (" DEFINED-ASSIGNED-COMP", dumpfile); + if (attr->unlimited_polymorphic) + fputs (" UNLIMITED-POLYMORPHIC", dumpfile); + if (attr->has_dtio_procs) + fputs (" HAS-DTIO-PROCS", dumpfile); + if (attr->caf_token) + fputs (" CAF-TOKEN", dumpfile); + if (attr->select_type_temporary) + fputs (" SELECT-TYPE-TEMPORARY", dumpfile); + if (attr->associate_var) + fputs (" ASSOCIATE-VAR", dumpfile); + if (attr->pdt_kind) + fputs (" PDT-KIND", dumpfile); + if (attr->pdt_len) + fputs (" PDT-LEN", dumpfile); + if (attr->pdt_type) + fputs (" PDT-TYPE", dumpfile); + if (attr->pdt_array) + fputs (" PDT-ARRAY", dumpfile); + if (attr->pdt_string) + fputs (" PDT-STRING", dumpfile); + if (attr->omp_udr_artificial_var) + fputs (" OMP-UDT-ARTIFICIAL-VAR", dumpfile); + if (attr->omp_declare_target) + fputs (" OMP-DECLARE-TARGET", dumpfile); + if (attr->omp_declare_target_link) + fputs (" OMP-DECLARE-TARGET-LINK", dumpfile); if (attr->elemental) fputs (" ELEMENTAL", dumpfile); if (attr->pure) fputs (" PURE", dumpfile); if (attr->implicit_pure) - fputs (" IMPLICIT_PURE", dumpfile); + fputs (" IMPLICIT-PURE", dumpfile); if (attr->recursive) fputs (" RECURSIVE", dumpfile); - + if (attr->unmaskable) + fputs (" UNMASKABKE", dumpfile); + if (attr->masked) + fputs (" MASKED", dumpfile); + if (attr->contained) + fputs (" CONTAINED", dumpfile); + if (attr->mod_proc) + fputs (" MOD-PROC", dumpfile); + if (attr->module_procedure) + fputs (" MODULE-PROCEDURE", dumpfile); + if (attr->public_used) + fputs (" PUBLIC_USED", dumpfile); + if (attr->array_outer_dependency) + fputs (" ARRAY-OUTER-DEPENDENCY", dumpfile); + if (attr->noreturn) + fputs (" NORETURN", dumpfile); + if (attr->always_explicit) + fputs (" ALWAYS-EXPLICIT", dumpfile); + if (attr->is_main_program) + fputs (" IS-MAIN-PROGRAM", dumpfile); + + /* FIXME: Still missing are oacc_routine_lop and ext_attr. */ fputc (')', dumpfile); }