public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38002] New: gcc crash using -fvisibility-ms-compat
@ 2008-11-03 14:58 bodzio131 at op dot pl
2008-11-03 14:59 ` [Bug c++/38002] " bodzio131 at op dot pl
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: bodzio131 at op dot pl @ 2008-11-03 14:58 UTC (permalink / raw)
To: gcc-bugs
gcc version 4.3.2 (GCC)
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.3.2/configure --prefix=/usr/local/gcc-4.3.2
--enable-languages=c,c++ --with-gmp=/home/builder/4gcc43
--with-mpfr=/home/builder/4gcc43 --with-as=/usr/local/gcc-4.3.2/bin/as
--with-gnu-as --with-ld=/usr/local/gcc-4.3.2/bin/ld --with-gnu-ld
Thread model: posix
system: Linux, Debian, 2.6.25
third party libraries: boost 1.33.1
command line: gcc error.cpp -I. -shared -o error.so -fvisibility-ms-compat
-lstdc++ -I$BOOST_INCLUDE_DIR -save-temps
gcc output:
/usr/local/gcc-4.3.2/boost_1_33_1/include/boost/lexical_cast.hpp: In
instantiation of 'Target boost::lexical_cast(const Source&) [with Target =
std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Source
= int*]':
error.cpp:6: instantiated from here
/usr/local/gcc-4.3.2/boost_1_33_1/include/boost/lexical_cast.hpp:223: internal
compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
How to attach *.ii file???
--
Summary: gcc crash using -fvisibility-ms-compat
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bodzio131 at op dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38002
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/38002] gcc crash using -fvisibility-ms-compat
2008-11-03 14:58 [Bug c++/38002] New: gcc crash using -fvisibility-ms-compat bodzio131 at op dot pl
@ 2008-11-03 14:59 ` bodzio131 at op dot pl
2008-11-03 16:09 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: bodzio131 at op dot pl @ 2008-11-03 14:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from bodzio131 at op dot pl 2008-11-03 14:58 -------
Created an attachment (id=16618)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16618&action=view)
preprocessor output
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38002
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/38002] gcc crash using -fvisibility-ms-compat
2008-11-03 14:58 [Bug c++/38002] New: gcc crash using -fvisibility-ms-compat bodzio131 at op dot pl
2008-11-03 14:59 ` [Bug c++/38002] " bodzio131 at op dot pl
@ 2008-11-03 16:09 ` rguenth at gcc dot gnu dot org
2008-11-03 16:43 ` [Bug middle-end/38002] " rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-11-03 16:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-11-03 16:07 -------
Reducing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38002
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/38002] gcc crash using -fvisibility-ms-compat
2008-11-03 14:58 [Bug c++/38002] New: gcc crash using -fvisibility-ms-compat bodzio131 at op dot pl
2008-11-03 14:59 ` [Bug c++/38002] " bodzio131 at op dot pl
2008-11-03 16:09 ` rguenth at gcc dot gnu dot org
@ 2008-11-03 16:43 ` rguenth at gcc dot gnu dot org
2009-10-26 17:39 ` boz_gnu at boz dot org dot uk
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-11-03 16:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-11-03 16:42 -------
Reduced testcase, not a regression.
namespace std __attribute__ ((__visibility__ ("default"))) {
class type_info { };
};
template<class E>
void throw_exception(E const & e);
class bad_lexical_cast {
public:
bad_lexical_cast(const std::type_info &target_type);
};
template<typename Source>
int lexical_cast(const Source &arg)
{
throw_exception(bad_lexical_cast(typeid(Source)));
}
int i;
int test = lexical_cast( &i );
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c++ |middle-end
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Known to fail| |4.3.0
Last reconfirmed|0000-00-00 00:00:00 |2008-11-03 16:42:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38002
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/38002] gcc crash using -fvisibility-ms-compat
2008-11-03 14:58 [Bug c++/38002] New: gcc crash using -fvisibility-ms-compat bodzio131 at op dot pl
` (2 preceding siblings ...)
2008-11-03 16:43 ` [Bug middle-end/38002] " rguenth at gcc dot gnu dot org
@ 2009-10-26 17:39 ` boz_gnu at boz dot org dot uk
2009-10-27 16:22 ` boz_gnu at boz dot org dot uk
2010-07-30 19:02 ` binocs38149 at mypacks dot net
5 siblings, 0 replies; 8+ messages in thread
From: boz_gnu at boz dot org dot uk @ 2009-10-26 17:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from boz_gnu at boz dot org dot uk 2009-10-26 17:39 -------
(In reply to comment #3)
> Reduced testcase, not a regression.
Here's a further reduction which still reproduces the crash:
namespace std __attribute__ ((__visibility__ ("default"))) {
class type_info { };
};
void foo() {
int i;
typeid(&i);
}
--
boz_gnu at boz dot org dot uk changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |boz_gnu at boz dot org dot
| |uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38002
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/38002] gcc crash using -fvisibility-ms-compat
2008-11-03 14:58 [Bug c++/38002] New: gcc crash using -fvisibility-ms-compat bodzio131 at op dot pl
` (3 preceding siblings ...)
2009-10-26 17:39 ` boz_gnu at boz dot org dot uk
@ 2009-10-27 16:22 ` boz_gnu at boz dot org dot uk
2010-07-30 19:02 ` binocs38149 at mypacks dot net
5 siblings, 0 replies; 8+ messages in thread
From: boz_gnu at boz dot org dot uk @ 2009-10-27 16:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from boz_gnu at boz dot org dot uk 2009-10-27 16:22 -------
Created an attachment (id=18917)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18917&action=view)
Proposed patch
Looks like all we were missing was a check on CLASS_TYPE_P before calling
CLASSTYPE_VISIBILITY_SPECIFIED.
This seems to fix the crash, at least for me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38002
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/38002] gcc crash using -fvisibility-ms-compat
2008-11-03 14:58 [Bug c++/38002] New: gcc crash using -fvisibility-ms-compat bodzio131 at op dot pl
` (4 preceding siblings ...)
2009-10-27 16:22 ` boz_gnu at boz dot org dot uk
@ 2010-07-30 19:02 ` binocs38149 at mypacks dot net
5 siblings, 0 replies; 8+ messages in thread
From: binocs38149 at mypacks dot net @ 2010-07-30 19:02 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]
------- Comment #6 from binocs38149 at mypacks dot net 2010-07-30 19:01 -------
(In reply to comment #5)
Apple seems to have fixed it a different way:
http://www.opensource.apple.com/source/gcc/gcc-5659/gcc/cp/decl2.c
{
tree underlying_type = TREE_TYPE (DECL_NAME (decl));
int underlying_vis = type_visibility (underlying_type);
if (underlying_vis == VISIBILITY_ANON
/* APPLE LOCAL begin 6983171 */
|| (TREE_CODE (underlying_type) == RECORD_TYPE
&& CLASSTYPE_VISIBILITY_SPECIFIED (underlying_type)))
/* APPLE LOCAL end 6983171 */
constrain_visibility (decl, underlying_vis);
else
DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT;
}
Im not sure which approach is better.
--
binocs38149 at mypacks dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |binocs38149 at mypacks dot
| |net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38002
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/38002] gcc crash using -fvisibility-ms-compat
[not found] <bug-38002-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-12 5:32 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12 5:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38002
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
Resolution|--- |DUPLICATE
Status|NEW |RESOLVED
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 47213. Fixed in GCC 4.6.0+.
*** This bug has been marked as a duplicate of bug 47213 ***
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-08-12 5:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-03 14:58 [Bug c++/38002] New: gcc crash using -fvisibility-ms-compat bodzio131 at op dot pl
2008-11-03 14:59 ` [Bug c++/38002] " bodzio131 at op dot pl
2008-11-03 16:09 ` rguenth at gcc dot gnu dot org
2008-11-03 16:43 ` [Bug middle-end/38002] " rguenth at gcc dot gnu dot org
2009-10-26 17:39 ` boz_gnu at boz dot org dot uk
2009-10-27 16:22 ` boz_gnu at boz dot org dot uk
2010-07-30 19:02 ` binocs38149 at mypacks dot net
[not found] <bug-38002-4@http.gcc.gnu.org/bugzilla/>
2021-08-12 5:32 ` [Bug c++/38002] " 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).