public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65780] [5/6 Regression] Uninitialized common handling in executables
Date: Thu, 16 Apr 2015 15:36:00 -0000	[thread overview]
Message-ID: <bug-65780-4-JIzd6fNUlK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65780-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65780

--- Comment #27 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #26)
> Created attachment 35333 [details]
> A patch with updated comments

Found a couple of issues, here is incremental diff, mostly formatting
improvements,
and in the case of default_binds_local_p_2 (right now unused, hopefully
incrementally used
by arm, s390 and perhaps other backends later), passing true to
common_maybe_local unconditionally,
when only in non-PIE binaries (thus !flag_pic) it works fine.

--- gcc/varasm.c
+++ gcc/varasm.c
@@ -6811,8 +6811,7 @@

 bool
 default_binds_local_p_3 (const_tree exp, bool shlib, bool weak_dominate,
-             bool extern_protected_data,
-             bool common_maybe_local)
+             bool extern_protected_data, bool common_maybe_local)
 {
   /* A non-decl is an entry in the constant pool.  */
   if (!DECL_P (exp))
@@ -6902,8 +6901,7 @@
 bool
 default_binds_local_p (const_tree exp)
 {
-  return default_binds_local_p_3 (exp, flag_shlib != 0, true, false,
-                  false);
+  return default_binds_local_p_3 (exp, flag_shlib != 0, true, false, false);
 }

 /* Similar to default_binds_local_p, but common symbol may be local.  */
@@ -6912,14 +6910,13 @@
 default_binds_local_p_2 (const_tree exp)
 {
   return default_binds_local_p_3 (exp, flag_shlib != 0, true, false,
-                  true);
+                  !flag_pic);
 }

 bool
 default_binds_local_p_1 (const_tree exp, int shlib)
 {
-  return default_binds_local_p_3 (exp, shlib != 0, false, false,
-                  false);
+  return default_binds_local_p_3 (exp, shlib != 0, false, false, false);
 }

 /* Return true when references to DECL must bind to current definition in


  parent reply	other threads:[~2015-04-16 15:36 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15 22:29 [Bug target/65780] New: [5 " jakub at gcc dot gnu.org
2015-04-15 22:30 ` [Bug target/65780] " jakub at gcc dot gnu.org
2015-04-15 23:01 ` james410 at cowgill dot org.uk
2015-04-15 23:13 ` hjl.tools at gmail dot com
2015-04-15 23:41 ` hjl.tools at gmail dot com
2015-04-16  0:37 ` amodra at gmail dot com
2015-04-16  2:10 ` hjl.tools at gmail dot com
2015-04-16  2:38 ` hjl.tools at gmail dot com
2015-04-16  3:22 ` [Bug target/65780] [5 Regression] Uninitialized common handling in PIE hjl.tools at gmail dot com
2015-04-16  3:28 ` [Bug target/65780] [5 Regression] Uninitialized common handling in executables amodra at gmail dot com
2015-04-16  4:32 ` hjl.tools at gmail dot com
2015-04-16  7:33 ` jakub at gcc dot gnu.org
2015-04-16  7:39 ` [Bug target/65780] [5/6 " rguenth at gcc dot gnu.org
2015-04-16  7:46 ` jakub at gcc dot gnu.org
2015-04-16 11:09 ` jakub at gcc dot gnu.org
2015-04-16 11:12 ` hjl.tools at gmail dot com
2015-04-16 11:20 ` hjl.tools at gmail dot com
2015-04-16 11:40 ` hjl.tools at gmail dot com
2015-04-16 11:44 ` jakub at gcc dot gnu.org
2015-04-16 11:46 ` hjl.tools at gmail dot com
2015-04-16 11:53 ` hjl.tools at gmail dot com
2015-04-16 12:12 ` jakub at gcc dot gnu.org
2015-04-16 12:33 ` hjl.tools at gmail dot com
2015-04-16 12:41 ` jakub at gcc dot gnu.org
2015-04-16 13:08 ` hjl.tools at gmail dot com
2015-04-16 13:10 ` jakub at gcc dot gnu.org
2015-04-16 13:16 ` hjl.tools at gmail dot com
2015-04-16 15:36 ` jakub at gcc dot gnu.org [this message]
2015-04-16 16:09 ` hjl.tools at gmail dot com
2015-04-16 18:14 ` law at redhat dot com
2015-04-16 18:33 ` hjl.tools at gmail dot com
2015-04-16 18:36 ` hjl.tools at gmail dot com
2015-04-16 19:20 ` law at redhat dot com
2015-04-16 19:28 ` hjl.tools at gmail dot com
2015-04-16 21:03 ` jakub at gcc dot gnu.org
2015-04-16 22:02 ` hjl.tools at gmail dot com
2015-04-17 16:12 ` law at redhat dot com
2015-04-17 16:26 ` [Bug target/65780] [5 " hjl.tools at gmail dot com
2015-04-17 16:30 ` jakub at gcc dot gnu.org
2015-04-17 16:36 ` hjl at gcc dot gnu.org
2015-04-17 16:37 ` hjl.tools at gmail dot com
2015-04-17 21:14 ` dominiq at lps dot ens.fr
2015-04-17 21:54 ` hjl at gcc dot gnu.org
2015-04-17 21:55 ` hjl at gcc dot gnu.org
2015-04-17 23:16 ` howarth.at.gcc at gmail dot com
2015-04-18  5:36 ` jakub at gcc dot gnu.org
2015-04-21 14:14 ` evstupac at gmail dot com
2015-04-21 14:18 ` jakub at gcc dot gnu.org
2015-05-11  7:09 ` jakub at gcc dot gnu.org
2015-05-11  7:14 ` jakub 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-65780-4-JIzd6fNUlK@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).