Bug 13303 - Putting a va_list in a struct causes seg fault
Summary: Putting a va_list in a struct causes seg fault
Status: RESOLVED DUPLICATE of bug 13302
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-04 14:15 UTC by stuart.menefy
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: sh4-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stuart.menefy 2003-12-04 14:15:28 UTC
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;
};
Comment 1 Wolfgang Bangerth 2003-12-04 15:13:09 UTC
Duplicate of 13302. 

*** This bug has been marked as a duplicate of 13302 ***