public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nightstrike at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/35159]  New: g++ inoperable with no error message
Date: Mon, 11 Feb 2008 07:38:00 -0000	[thread overview]
Message-ID: <bug-35159-14772@http.gcc.gnu.org/bugzilla/> (raw)

To summarize, c++ doesn't work in a native build for x86_64-pc-mingw32. We have
found that not all of c++ is broken, and I've been narrowing it down further.
The problem manifests itself as a segfault and ICE that is only visible when
you use the -E switch -- otherwise, the failure is silent. This in and of
itself I think is a bug, and we should report it to gcc. 

The segfault can be triggered by #including a c++ header like iostream or
cmath. Further digging reveals that it's not all of the headers. I found that
for instance cassert works fine. I've been able to narrow down cmath's failure
due to including <ext/type_traits.h>, and this might be the failure point for
everything.

I think I've found a reduced test case... 

#include <bits/c++config.h> 
#include <bits/cpp_type_traits.h> 
template<bool, typename> 
struct __enable_if 
{ }; 

template<typename _Tp> 
struct __enable_if<true, _Tp> 
{ typedef _Tp __type; }; 

int main() {return 0; } 



That code is taken from the ext/type_traits.h header. It doesn't give any error
(and no segfault in the -E output), but it won't compile. If you get rid of the
second template, it will compile and link to create an executable. This is, I
think, getting much closer to the heart of the problem. I think we should post
on gcc soon for this.


-- 
           Summary: g++ inoperable with no error message
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nightstrike at gmail dot com
  GCC host triplet: x86_64-pc-mingw32
GCC target triplet: x86_64-pc-mingw32


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


             reply	other threads:[~2008-02-11  7:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11  7:38 nightstrike at gmail dot com [this message]
2008-02-11  7:40 ` [Bug c++/35159] " nightstrike at gmail dot com
2008-02-11 14:52 ` rguenth at gcc dot gnu dot org
2008-02-11 14:57 ` ktietz at gcc dot gnu dot org
2008-02-14  1:54 ` nightstrike at gmail dot com
2008-02-14  7:00 ` mmitchel at gcc dot gnu dot org
2008-02-14  8:16 ` jakub at gcc dot gnu dot org
2008-02-14  9:08 ` ktietz at gcc dot gnu dot org
2008-02-14  9:19 ` ubizjak at gmail dot com
2008-02-14  9:27 ` ktietz at gcc dot gnu dot org
2008-02-14  9:33 ` rguenth at gcc dot gnu dot org
2008-02-14  9:39 ` ubizjak at gmail dot com
2008-02-14 10:04 ` ktietz at gcc dot gnu dot org
2008-02-14 14:28 ` nightstrike at gmail dot com
2008-02-14 14:29 ` nightstrike at gmail dot com
2008-02-16 17:23 ` [Bug c++/35159] g++ and gfortran " nightstrike at gmail dot com
2008-02-16 19:51 ` ktietz at gcc dot gnu dot org
2008-03-06  3:01 ` nightstrike at gmail dot com
2008-03-06  4:51 ` jvdelisle at gcc dot gnu dot org
2008-03-06  5:10 ` nightstrike at gmail dot com
2008-03-06 16:09 ` nightstrike at gmail dot com
2008-03-08  6:06 ` jvdelisle at gcc dot gnu dot org
2008-05-13 13:24 ` nightstrike at gmail dot com
2008-09-21 15:03 ` pepalogik at seznam dot cz
2008-09-21 17:08 ` nightstrike at gmail dot com
2008-10-20 11:25 ` ktietz at gcc dot gnu dot org
2009-06-24 10:28 ` ktietz at gcc dot gnu dot 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-35159-14772@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).