public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/99562] New: Invalid debug info: objdump: Warning: Location list starting at offset 0x9c3 is not terminated.
Date: Fri, 12 Mar 2021 15:40:34 +0000	[thread overview]
Message-ID: <bug-99562-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 99562
           Summary: Invalid debug info: objdump: Warning: Location list
                    starting at offset 0x9c3 is not terminated.
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org, mark at gcc dot gnu.org
  Target Milestone: ---

The following produces an invalid debug info:

cat fsize.ii
template < class, class, class, class = void, class = void > struct expression;
template < class tag, class Arg1, class Arg2 >
struct expression< tag, Arg1, Arg2 > {};
template < class Backend > class number {
public:
  template < class tag, class Arg1, class Arg2, class Arg3, class Arg4 >
  void operator=(expression< tag, Arg1, Arg2, Arg3, Arg4 > e) {
    do_assign(e, int());
  }
  template < class tag, class Arg1, class Arg2, class Arg3, class Arg4 >
  number(expression< tag, Arg1, Arg2, Arg3, Arg4 > e) {
    *this = e;
  }
  template < class tag, class Arg1, class Arg2, class Arg3, class Arg4 >
  void do_assign(expression< tag, Arg1, Arg2, Arg3, Arg4 > e, int) {
    Backend __trans_tmp_3 ;
    eval_multiply(m_backend, __trans_tmp_3, canonical_value(e));
  }
  Backend m_backend;
  Backend canonical_value(number);
};
enum cpp_integer_type { signed_magnitude };
enum cpp_int_check_type { unchecked };
template < unsigned = 0, unsigned = 0, cpp_integer_type = signed_magnitude,
           cpp_int_check_type = unchecked, class = int >
struct Trans_NS_backends_cpp_int_backend;
struct cpp_int_base {
  bool m_alias;
  void allocator();
  cpp_int_base() {
    {
      if (m_alias)
        allocator();
    }
  }
};
template < unsigned, unsigned, cpp_integer_type, cpp_int_check_type, class >
struct Trans_NS_backends_cpp_int_backend : cpp_int_base {};
template < unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1,
           cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2,
           unsigned MaxBits2, cpp_integer_type SignType2,
           cpp_int_check_type Checked2, class Allocator2, unsigned MinBits3,
           unsigned MaxBits3, cpp_integer_type SignType3,
           cpp_int_check_type Checked3, class Allocator3 >
void
eval_multiply(Trans_NS_backends_cpp_int_backend< MinBits1, MaxBits1, SignType1,
                                                 Checked1, Allocator1 >,
              Trans_NS_backends_cpp_int_backend< MinBits2, MaxBits2, SignType2,
                                                 Checked2, Allocator2 >,
              Trans_NS_backends_cpp_int_backend< MinBits3, MaxBits3, SignType3,
                                                 Checked3, Allocator3 >) {
  Trans_NS_backends_cpp_int_backend<> t0;
  __int128 limb_max = ~static_cast< unsigned long >(0);
}
class FSize {
  number< Trans_NS_backends_cpp_int_backend<> > _size;
  FSize();
};
expression< int, int, int > __trans_tmp_13;
FSize::FSize() : _size(__trans_tmp_13) {}

$ g++ -gdwarf-4 fsize.ii -c -g -O && objdump -g fsize.o >/dev/null
objdump: Warning: Location list starting at offset 0x9c3 is not terminated.
objdump: Warning: There is a hole [0x9f9 - 0xa0f] in .debug_loc section.
objdump: Warning: Location list starting at offset 0xa8b is not terminated.
objdump: Warning: There is a hole [0xac1 - 0xad7] in .debug_loc section.
objdump: Warning: Location list starting at offset 0xb53 is not terminated.
objdump: Warning: There is a hole [0xb89 - 0xb9f] in .debug_loc section.
objdump: Warning: Location list starting at offset 0xc1b is not terminated.
objdump: Warning: There is a hole [0xc51 - 0xc67] in .debug_loc section.

             reply	other threads:[~2021-03-12 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 15:40 marxin at gcc dot gnu.org [this message]
2021-03-12 15:47 ` [Bug debug/99562] " marxin at gcc dot gnu.org
2021-03-12 15:48 ` jakub at gcc dot gnu.org
2021-03-12 16:31 ` jakub at gcc dot gnu.org
2021-03-12 16:44 ` jakub at gcc dot gnu.org
2021-03-22  7:53 ` cvs-commit 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-99562-4@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).