public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/48412] [4.7 Regression] CP2K miscompiled due to some Fortran frontend pass
Date: Sun, 03 Apr 2011 17:28:00 -0000	[thread overview]
Message-ID: <bug-48412-4-SIkHUfHPBs@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48412-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48412

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-04-03 17:28:14 UTC ---
Hi Joost,

the following patch

Index: frontend-passes.c
===================================================================
--- frontend-passes.c   (Revision 171913)
+++ frontend-passes.c   (Arbeitskopie)
@@ -279,6 +279,20 @@
   return result;
 }

+/* Warn about function removal, uncontitionally for now.  */
+
+static void
+warn_function_removal(gfc_expr *e)
+{
+  if (e->expr_type != EXPR_FUNCTION)
+    return;
+  if (e->value.function.esym)
+    gfc_warning ("Removing call to function %s at %L",
+                e->value.function.esym->name, &(e->where));
+  else if (e->value.function.isym)
+    gfc_warning ("Removing call to function %s at %L",
+                e->value.function.isym->name, &(e->where));
+}
 /* Callback function for the code walker for doing common function
    elimination.  This builds up the list of functions in the expression
    and goes through them to detect duplicates, which it then replaces
@@ -311,6 +325,8 @@
            {
              if (newvar == NULL)
                newvar = create_var (*(expr_array[i]));
+
+             warn_function_removal (*(expr_array[j]));
              gfc_free (*(expr_array[j]));
              *(expr_array[j]) = gfc_copy_expr (newvar);
            }

could maybe help you debug this by showing which functions get removed.


  parent reply	other threads:[~2011-04-03 17:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-02  7:13 [Bug fortran/48412] New: " Joost.VandeVondele at pci dot uzh.ch
2011-04-02 10:25 ` [Bug fortran/48412] " steven at gcc dot gnu.org
2011-04-03 11:11 ` rguenth at gcc dot gnu.org
2011-04-03 17:28 ` tkoenig at gcc dot gnu.org [this message]
2011-04-04  9:07 ` Joost.VandeVondele at pci dot uzh.ch
2011-04-04 10:52 ` Joost.VandeVondele at pci dot uzh.ch
2011-04-04 11:53 ` Joost.VandeVondele at pci dot uzh.ch
2011-04-04 20:22 ` tkoenig at gcc dot gnu.org
2011-04-04 20:27 ` tkoenig at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-48412-4-SIkHUfHPBs@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).