public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/66279] New: Input/output asm operand is not loaded inside a constructor with a virtual base class
@ 2015-05-25 16:57 andrey.vihrov at gmail dot com
2015-05-25 17:00 ` [Bug inline-asm/66279] " andrey.vihrov at gmail dot com
2024-03-12 7:45 ` [Bug c++/66279] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: andrey.vihrov at gmail dot com @ 2015-05-25 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66279
Bug ID: 66279
Summary: Input/output asm operand is not loaded inside a
constructor with a virtual base class
Product: gcc
Version: 5.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: inline-asm
Assignee: unassigned at gcc dot gnu.org
Reporter: andrey.vihrov at gmail dot com
Target Milestone: ---
Created attachment 35620
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35620&action=edit
Testcase
When inline assembly is used inside a constructor of a class with a virtual
base class, and the inline assembly block has an input/output operand, GCC
fails to load the value of the operand into a corresponding register.
The attached code, compiled with GCC 5.1, produces
a.out: test.cpp:16: B::B(): Assertion `x == 42' failed.
This happens with both -O2 and -O0. Remove 'virtual' or place the code in a
regular function, and the assertion will succeed. Marking the ctor as inline
also makes the assertion succeed.
gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-5-20150519/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --enable-multilib --disable-werror
--enable-checking=release --with-default-libstdcxx-abi=c++98
Thread model: posix
gcc version 5.1.0 (GCC)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug inline-asm/66279] Input/output asm operand is not loaded inside a constructor with a virtual base class
2015-05-25 16:57 [Bug inline-asm/66279] New: Input/output asm operand is not loaded inside a constructor with a virtual base class andrey.vihrov at gmail dot com
@ 2015-05-25 17:00 ` andrey.vihrov at gmail dot com
2024-03-12 7:45 ` [Bug c++/66279] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: andrey.vihrov at gmail dot com @ 2015-05-25 17:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66279
Andrey Vihrov <andrey.vihrov at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35620|0 |1
is obsolete| |
--- Comment #1 from Andrey Vihrov <andrey.vihrov at gmail dot com> ---
Created attachment 35621
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35621&action=edit
Testcase
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/66279] [11/12/13/14 Regression] Input/output asm operand is not loaded inside a constructor with a virtual base class
2015-05-25 16:57 [Bug inline-asm/66279] New: Input/output asm operand is not loaded inside a constructor with a virtual base class andrey.vihrov at gmail dot com
2015-05-25 17:00 ` [Bug inline-asm/66279] " andrey.vihrov at gmail dot com
@ 2024-03-12 7:45 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-12 7:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66279
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.4.7
Known to fail| |4.5.3
Target Milestone|--- |11.5
Summary|Input/output asm operand is |[11/12/13/14 Regression]
|not loaded inside a |Input/output asm operand is
|constructor with a virtual |not loaded inside a
|base class |constructor with a virtual
| |base class
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This used to work in GCC 4.4.7
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-12 7:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-25 16:57 [Bug inline-asm/66279] New: Input/output asm operand is not loaded inside a constructor with a virtual base class andrey.vihrov at gmail dot com
2015-05-25 17:00 ` [Bug inline-asm/66279] " andrey.vihrov at gmail dot com
2024-03-12 7:45 ` [Bug c++/66279] [11/12/13/14 Regression] " pinskia at gcc dot gnu.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).