public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/94134] pdp11-aout puts initial variable into .text section rather than .data
Date: Thu, 17 Sep 2020 14:24:47 +0000	[thread overview]
Message-ID: <bug-94134-4-JnzzSaJwSy@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94134-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:4910b2e4cfe25c95fef18cf54125b788c190cfb2

commit r8-10462-g4910b2e4cfe25c95fef18cf54125b788c190cfb2
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Mar 11 18:35:13 2020 +0100

    pdp11: Fix handling of common (local and global) vars [PR94134]

    As mentioned in the PR, the generic code decides to put the a variable into
    lcomm_section, which is a NOSWITCH section and thus the generic code
doesn't
    switch into a particular section before using
    ASM_OUTPUT{_ALIGNED{,_DECL}_}_LOCAL, on many targets that results just in
    .lcomm (or for non-local .comm) directives which don't need a switch to
some
    section, other targets put switch_to_section (bss_section) at the start of
    that macro.
    pdp11 doesn't do that (and doesn't have bss_section), and so emits the
    lcomm/comm variables in whatever section is current (it has only
.text/.data
    and for DEC assembler rodata).

    The following patch fixes that by putting it always into data section, and
    additionally avoids emitting an empty line in the assembly for the lcomm
    vars.

    2020-03-11  Jakub Jelinek  <jakub@redhat.com>

            PR target/94134
            * config/pdp11/pdp11.c (pdp11_asm_output_var): Call
switch_to_section
            at the start to switch to data section.  Don't print extra newline
if
            .globl directive has not been emitted.

            * gcc.c-torture/execute/pr94134.c: New test.

    (cherry picked from commit f1125cf88ac0c97d819e4f81d556fbcd1161270e)

  parent reply	other threads:[~2020-09-17 14:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11  6:52 [Bug target/94134] New: " casner at acm dot org
2020-03-11  7:05 ` [Bug target/94134] " casner at acm dot org
2020-03-11  7:32 ` pinskia at gcc dot gnu.org
2020-03-11  7:34 ` pinskia at gcc dot gnu.org
2020-03-11  8:26 ` jakub at gcc dot gnu.org
2020-03-11 14:48 ` jakub at gcc dot gnu.org
2020-03-11 14:52 ` jakub at gcc dot gnu.org
2020-03-11 16:57 ` pkoning at gcc dot gnu.org
2020-03-11 17:37 ` jakub at gcc dot gnu.org
2020-03-11 20:14 ` casner at acm dot org
2020-03-11 20:19 ` casner at acm dot org
2020-03-11 21:10 ` pkoning at gcc dot gnu.org
2020-03-11 23:18 ` casner at acm dot org
2020-03-11 23:43 ` casner at acm dot org
2020-03-17 18:57 ` cvs-commit at gcc dot gnu.org
2020-09-17 14:24 ` cvs-commit at gcc dot gnu.org [this message]
2020-09-17 17:18 ` jakub at gcc dot gnu.org
2020-09-18  5:27 ` casner at acm dot 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-94134-4-JnzzSaJwSy@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).