public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "stuart dot menefy at st dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/13302] New: Putting a va_list in a struct causes seg fault
Date: Thu, 04 Dec 2003 13:33:00 -0000	[thread overview]
Message-ID: <20031204133352.13302.stuart.menefy@st.com> (raw)

This problem was found when building mozilla. Creating a struct which
contains a va_list element (which is actually a __builtin_va_list) causes
the C++ compiler to seg fault.

The problems is not seen when using the C compiler or compiling for sh3
(only sh4). It is preset in gcc 3.0.3, 3.2.1, 3.3.2 and 3.4 snapshot 20030222.
I suspect it was not present in gcc 2.95, but cannot confirm this.

To reproduce:
% /var/tmp/gcc-3.4-20031126/objdir/gcc/xgcc
-B/var/tmp/gcc-3.4-20031126/objdir/gcc/ -O0 nsTextFormatter.ii -m4 -c
nsTextFormatter.ii:4: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

% cat nsTextFormatter.ii
typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;

struct NumArgState{
    va_list ap;
};

-- 
           Summary: Putting a va_list in a struct causes seg fault
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stuart dot menefy at st dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sh4-linux-gnu


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


             reply	other threads:[~2003-12-04 13:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-04 13:33 stuart dot menefy at st dot com [this message]
2003-12-04 15:13 ` [Bug c++/13302] " bangerth at dealii dot org
2003-12-04 15:15 ` bangerth at dealii dot org
2003-12-04 16:44 ` [Bug target/13302] " pinskia at gcc dot gnu dot org
2003-12-04 19:20 ` stuart dot menefy at st dot com
2003-12-04 19:45 ` [Bug target/13302] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
2003-12-05 13:57 ` amylaar at gcc dot gnu dot org
2003-12-05 15:48 ` cvs-commit at gcc dot gnu dot org
2003-12-05 15:56 ` cvs-commit at gcc dot gnu dot org
2003-12-05 15:58 ` amylaar 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=20031204133352.13302.stuart.menefy@st.com \
    --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).