public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65062] New: [4.9 Regression] Miscompilation: invalid C++ mangled name for global variable
@ 2015-02-14  2:44 thiago at kde dot org
  2015-02-14  2:49 ` [Bug c++/65062] " pinskia at gcc dot gnu.org
  2015-02-14  2:54 ` thiago at kde dot org
  0 siblings, 2 replies; 3+ messages in thread
From: thiago at kde dot org @ 2015-02-14  2:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65062
           Summary: [4.9 Regression] Miscompilation: invalid C++ mangled
                    name for global variable
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thiago at kde dot org

Code:

template <class>
void tf()
{
  extern void (*qt_memfill32)();
  qt_memfill32();
}

void f() {
  tf<int>();
}

When compiled with GCC 5.0, the object file has a reference to
"_Z12qt_memfill32", which doesn't seem to me to be a valid C++ mangled name. At
the very least, it's an ABI compatibility break with previous versions of GCC,
other compilers and with itself.

This symbol is defined in another .o as "qt_memfill32", even when compiled with
GCC 5.0.

Tests:

gcc-5.0 -O2 -S -o - test.cpp:
        jmp     *_Z12qt_memfill32(%rip)

gcc-4.9 -O2 -S -o - test.cpp:
        movq    qt_memfill32(%rip), %rax
        jmp     *%rax

clang-3.6 -O2 -S -o - test.cpp:
        jmpq    *qt_memfill32(%rip)  # TAILCALL

icpc -O2 -S -o - test.cpp:
        movq      qt_memfill32(%rip), %rax
        jmp       *%rax


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/65062] [4.9 Regression] Miscompilation: invalid C++ mangled name for global variable
  2015-02-14  2:44 [Bug c++/65062] New: [4.9 Regression] Miscompilation: invalid C++ mangled name for global variable thiago at kde dot org
@ 2015-02-14  2:49 ` pinskia at gcc dot gnu.org
  2015-02-14  2:54 ` thiago at kde dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-14  2:49 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
it was just fixed yesterday, see bug 64898.  Please check the latest GCC before
filing a bug especially during stage 4.

*** This bug has been marked as a duplicate of bug 64898 ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/65062] [4.9 Regression] Miscompilation: invalid C++ mangled name for global variable
  2015-02-14  2:44 [Bug c++/65062] New: [4.9 Regression] Miscompilation: invalid C++ mangled name for global variable thiago at kde dot org
  2015-02-14  2:49 ` [Bug c++/65062] " pinskia at gcc dot gnu.org
@ 2015-02-14  2:54 ` thiago at kde dot org
  1 sibling, 0 replies; 3+ messages in thread
From: thiago at kde dot org @ 2015-02-14  2:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Thiago Macieira <thiago at kde dot org> ---
(In reply to Andrew Pinski from comment #1)
> it was just fixed yesterday, see bug 64898.  Please check the latest GCC
> before filing a bug especially during stage 4.
> 
> *** This bug has been marked as a duplicate of bug 64898 ***

Sorry, I did rebuild two days ago when this started showing up. I must have
missed the fix by a few hours, more or less (again).


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-14  2:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-14  2:44 [Bug c++/65062] New: [4.9 Regression] Miscompilation: invalid C++ mangled name for global variable thiago at kde dot org
2015-02-14  2:49 ` [Bug c++/65062] " pinskia at gcc dot gnu.org
2015-02-14  2:54 ` thiago at kde dot org

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).