public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tamiko at gentoo dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/113976] [11/12/13/14 Regression] explicit instantiation of const variable template following implicit instantiation is assembled in .rodata instead of .bss
Date: Sun, 18 Feb 2024 08:03:09 +0000	[thread overview]
Message-ID: <bug-113976-4-p1lhaFYc1i@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113976-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Matthias Maier <tamiko at gentoo dot org> ---
I have bisected the issue to:

commit 2ec399d8a6c9c26d69b73faf77c694fa3915dcec (HEAD, refs/bisect/bad)
Author: Joerg Sonnenberger <joerg@bec.de>
Date:   Fri Sep 1 10:26:00 2017 -0600

    varasm.c (bss_initializer_p): Do not put constants into .bss

            * varasm.c (bss_initializer_p): Do not put constants into .bss
            (categorize_decl_for_section): Handle bss_initializer_p returning
            false when DECL_INITIAL is NULL.

            * gcc.target/i386/const-in-bss.c: New test.

    From-SVN: r251602


(But I have the feeling that the issue really lies in `mpi_type_id_for_type<T>`
being misidentified as a constant (suitable for .rodata). The above commit
might have merely made the issue visible by turning it into a segfault.)



bisect log:
git bisect start
# good: [883312dc79806f513275b72502231c751c14ff72] Use ucontext_t not struct
ucontext in linux-unwind.h files.
git bisect good 883312dc79806f513275b72502231c751c14ff72
# bad: [406c2abec3f998e9064919b22db62f38a7c0e7b9] * gennews (files): Add files
for GCC 8.
git bisect bad 406c2abec3f998e9064919b22db62f38a7c0e7b9
# bad: [9cf7bfd919f394595c0ac561ed67b333a39ae51e] PR 83070 Fix -Wsign-compare
warning
git bisect bad 9cf7bfd919f394595c0ac561ed67b333a39ae51e
# bad: [01f44e44faf37fc34775b9e28e46d1c9243b247d] i386: Update preferred stack
boundary for leaf functions
git bisect bad 01f44e44faf37fc34775b9e28e46d1c9243b247d
# good: [30af3a2bbd315bf82363c066a335a040dede9901] Boolify some parameters.
git bisect good 30af3a2bbd315bf82363c066a335a040dede9901
# good: [3ca3c6ef7110fb842cf8175a58d91d239c418bbe] re PR sanitizer/81902 (new
-fsanitize=pointer-overflow option undocumented)
git bisect good 3ca3c6ef7110fb842cf8175a58d91d239c418bbe
# bad: [0f99f8e6d63038b68e5e7af950ff9e329bdc40ad] Daily bump.
git bisect bad 0f99f8e6d63038b68e5e7af950ff9e329bdc40ad
# bad: [95edbf5e5fb2c57ceda70cdf277d9b7655c1796e] Minor reformatting.
git bisect bad 95edbf5e5fb2c57ceda70cdf277d9b7655c1796e
# bad: [806fcf7183377c7df062a7fa0bcf9d0ce8ea1fc0] trans.c
(adjust_for_implicit_deref): New function.
git bisect bad 806fcf7183377c7df062a7fa0bcf9d0ce8ea1fc0
# bad: [ca1150f0129abd2b0b52ad0c701a6bd7e0a1fc76] re PR sanitizer/81981
(-fsanitize=undefined makes a -Wmaybe-uninitialized warning disappear)
git bisect bad ca1150f0129abd2b0b52ad0c701a6bd7e0a1fc76
# bad: [0c949f0a1ce9cfa8c48e62628493140d60e65ea7] re PR libquadmath/81848 (Add
PowerPC support to libquadmath)
git bisect bad 0c949f0a1ce9cfa8c48e62628493140d60e65ea7
# bad: [beb8b5c154e57f5c2e3e6f372c2bae9a10f619b4] class.c
(finish_struct_methods): Done clear DECL_IN_AGGR_P here.
git bisect bad beb8b5c154e57f5c2e3e6f372c2bae9a10f619b4
# good: [db6bb1ec036f180584d221cdc66dff7bb7180d7a] S/390: PR82012: Implement
CAN_INLINE_P target hook.
git bisect good db6bb1ec036f180584d221cdc66dff7bb7180d7a
# bad: [e035be33793fa4aef8cff3358c9670a648d5d273] Fix excess precision handling
of compound assignments (PR c/82071).
git bisect bad e035be33793fa4aef8cff3358c9670a648d5d273
# bad: [2ec399d8a6c9c26d69b73faf77c694fa3915dcec] varasm.c (bss_initializer_p):
Do not put constants into .bss
git bisect bad 2ec399d8a6c9c26d69b73faf77c694fa3915dcec
# first bad commit: [2ec399d8a6c9c26d69b73faf77c694fa3915dcec] varasm.c
(bss_initializer_p): Do not put constants into .bss

  parent reply	other threads:[~2024-02-18  8:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 21:17 [Bug c++/113976] New: " tamiko at gentoo dot org
2024-02-17 21:29 ` [Bug c++/113976] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
2024-02-18  6:49 ` sjames at gcc dot gnu.org
2024-02-18  8:03 ` tamiko at gentoo dot org [this message]
2024-02-18 18:06 ` [Bug c++/113976] [11/12/13/14 Regression] explicit instantiation of const variable template following implicit instantiation is assembled in .rodata instead of .bss since r8-2857-g2ec399d8a6c9c2 law at gcc dot gnu.org
2024-02-18 18:09 ` pinskia at gcc dot gnu.org
2024-02-18 18:39 ` jakub at gcc dot gnu.org
2024-02-19  8:10 ` rguenth at gcc dot gnu.org
2024-02-19 16:00 ` jakub at gcc dot gnu.org
2024-02-19 16:58 ` jakub at gcc dot gnu.org
2024-02-19 17:30 ` jakub at gcc dot gnu.org
2024-02-19 17:49 ` jakub at gcc dot gnu.org
2024-02-19 18:15 ` ppalka at gcc dot gnu.org
2024-02-28 22:22 ` cvs-commit at gcc dot gnu.org
2024-03-01 14:38 ` [Bug c++/113976] [11/12/13 " 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-113976-4-p1lhaFYc1i@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).