public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rafael Espindola <espindola@google.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Richard Guenther <richard.guenther@gmail.com>,
	        Diego Novillo <dnovillo@google.com>,
	        Paul Brook <paul@codesourcery.com>
Subject: Re: [patch] Fix PR41764
Date: Mon, 26 Oct 2009 18:53:00 -0000	[thread overview]
Message-ID: <38a0d8450910261141i5f4dda4erfd4122c388f2f240@mail.gmail.com> (raw)
In-Reply-To: <38a0d8450910211517j4af51106qf3f81c169a7e830c@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

> Looks like this breaks debug generation for fortran:

The attached patch reduces the problems to:

gfortran.dg/debug/pr35154-stabs.f scan-assembler .stabs.*"__BLNK__",226
gfortran.dg/debug/pr35154-stabs.f scan-assembler .stabs.*"__BLNK__",228
gfortran.dg/debug/pr35154-stabs.f scan-assembler .stabs.*"label_",226
gfortran.dg/debug/pr35154-stabs.f scan-assembler .stabs.*"label_",228

Debugging...

Cheers,
-- 
Rafael Ávila de Espíndola

[-- Attachment #2: fake.patch --]
[-- Type: text/x-diff, Size: 1823 bytes --]

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index ba59251..cb3d790 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -15606,12 +15606,11 @@ fortran_common (tree decl, HOST_WIDE_INT *value)
   tree offset;
   int volatilep = 0, unsignedp = 0;
 
-  /* If the decl isn't a VAR_DECL, or if it isn't public or static, or if
+  /* If the decl isn't a VAR_DECL, or if it isn't static, or if
      it does not have a value (the offset into the common area), or if it
      is thread local (as opposed to global) then it isn't common, and shouldn't
      be handled as such.  */
   if (TREE_CODE (decl) != VAR_DECL
-      || !TREE_PUBLIC (decl)
       || !TREE_STATIC (decl)
       || !DECL_HAS_VALUE_EXPR_P (decl)
       || !is_fortran ())
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c
index 5b1952a..1fb3c40 100644
--- a/gcc/fortran/trans-common.c
+++ b/gcc/fortran/trans-common.c
@@ -680,7 +680,6 @@ create_common (gfc_common_head *com, segment_info *head, bool saw_equiv)
       var_decl = build_decl (s->sym->declared_at.lb->location,
 			     VAR_DECL, DECL_NAME (s->field),
 			     TREE_TYPE (s->field));
-      TREE_PUBLIC (var_decl) = TREE_PUBLIC (decl);
       TREE_STATIC (var_decl) = TREE_STATIC (decl);
       TREE_USED (var_decl) = TREE_USED (decl);
       if (s->sym->attr.use_assoc)
@@ -689,7 +688,9 @@ create_common (gfc_common_head *com, segment_info *head, bool saw_equiv)
 	TREE_ADDRESSABLE (var_decl) = 1;
       /* This is a fake variable just for debugging purposes.  */
       TREE_ASM_WRITTEN (var_decl) = 1;
-      
+      /* Fake variables are not visible from other translation units. */
+      TREE_PUBLIC (var_decl) = 0;
+
       /* To preserve identifier names in COMMON, chain to procedure
          scope unless at top level in a module definition.  */
       if (com

  reply	other threads:[~2009-10-26 18:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 18:09 Rafael Espindola
2009-10-21 22:46 ` Rafael Espindola
2009-10-26 18:53   ` Rafael Espindola [this message]
2009-10-28  4:24     ` Rafael Espindola
2009-10-28 14:27       ` Rafael Espindola
2009-10-28 19:20         ` Toon Moene
2009-10-28 19:37           ` Rafael Espindola
2009-10-28 14:34       ` Ian Lance Taylor
2009-10-28 20:38         ` Tobias Burnus

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=38a0d8450910261141i5f4dda4erfd4122c388f2f240@mail.gmail.com \
    --to=espindola@google.com \
    --cc=dnovillo@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=paul@codesourcery.com \
    --cc=richard.guenther@gmail.com \
    /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).