public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49196] New: GCC 4.2.1 [FreeBSD] segfaults with certain use of void typedefs with debugging symbols
@ 2011-05-27 17:23 darkuranium at gmail dot com
  2011-05-27 17:25 ` [Bug c++/49196] " paolo.carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: darkuranium at gmail dot com @ 2011-05-27 17:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49196

           Summary: GCC 4.2.1 [FreeBSD] segfaults with certain use of void
                    typedefs with debugging symbols
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: darkuranium@gmail.com


Created attachment 24375
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24375
Test file showing the bug

The following makes GCC segfault:
namespace foo
{
    typedef void Fvoid;
}
using foo::Fvoid;

int main()
{
    return 0;
} // < segfault reported on this line

Note that the code should be compiled with debugging symbols activated (I've
tested with -g or -ggdb) - without them, the bug does not get triggered.

Namespaces can be nested deeper ("using foo::bar::Fvoid;") and the bug still
appears.

Merely using the type does NOT trigger a segfault:
// these do NOT segfault:
foo::Fvoid* v1;
using namespace foo;
Fvoid* v2;

Compile the test file with: g++ -g "test.cpp"

Error reported: test.cpp:25: internal compiler error: Segmentation fault: 11


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

* [Bug c++/49196] GCC 4.2.1 [FreeBSD] segfaults with certain use of void typedefs with debugging symbols
  2011-05-27 17:23 [Bug c++/49196] New: GCC 4.2.1 [FreeBSD] segfaults with certain use of void typedefs with debugging symbols darkuranium at gmail dot com
@ 2011-05-27 17:25 ` paolo.carlini at oracle dot com
  2011-05-28 13:13 ` rguenth at gcc dot gnu.org
  2011-05-28 19:48 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-27 17:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49196

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011.05.27 17:23:16
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-27 17:23:16 UTC ---
It doesn't on Linux for the currently maintained branches.

Please update your compiler - 4.2.x is very old and not maintained anymore -
and report back, thanks.


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

* [Bug c++/49196] GCC 4.2.1 [FreeBSD] segfaults with certain use of void typedefs with debugging symbols
  2011-05-27 17:23 [Bug c++/49196] New: GCC 4.2.1 [FreeBSD] segfaults with certain use of void typedefs with debugging symbols darkuranium at gmail dot com
  2011-05-27 17:25 ` [Bug c++/49196] " paolo.carlini at oracle dot com
@ 2011-05-28 13:13 ` rguenth at gcc dot gnu.org
  2011-05-28 19:48 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-28 13:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49196

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-28 13:07:46 UTC ---
Report to the FreeBSD people (who do not want to update to a GPLv3 GCC
release).


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

* [Bug c++/49196] GCC 4.2.1 [FreeBSD] segfaults with certain use of void typedefs with debugging symbols
  2011-05-27 17:23 [Bug c++/49196] New: GCC 4.2.1 [FreeBSD] segfaults with certain use of void typedefs with debugging symbols darkuranium at gmail dot com
  2011-05-27 17:25 ` [Bug c++/49196] " paolo.carlini at oracle dot com
  2011-05-28 13:13 ` rguenth at gcc dot gnu.org
@ 2011-05-28 19:48 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-28 19:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49196

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-28 19:45:35 UTC ---
(In reply to comment #2)
> (who do not want to update to a GPLv3 GCC release).

Boy, this is the most insane (and funny, because I don't care much about
FreeBSD anyway) thing I learned over the last few months. Thanks Richard.


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

end of thread, other threads:[~2011-05-28 19:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27 17:23 [Bug c++/49196] New: GCC 4.2.1 [FreeBSD] segfaults with certain use of void typedefs with debugging symbols darkuranium at gmail dot com
2011-05-27 17:25 ` [Bug c++/49196] " paolo.carlini at oracle dot com
2011-05-28 13:13 ` rguenth at gcc dot gnu.org
2011-05-28 19:48 ` paolo.carlini at oracle dot com

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