[Bug c++/36794] New: Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread vanco dot gccbugzilla at vancomaja dot com
A funny use of __attribute__ ((packed)) caused a seg fault. 
Code: 
== (see attachment for full preprocessed file)
struct wrap_a {int a;};
struct wrap_b {long b;}; // note: 64bit machine
typedef std::pair my_pair; // crash!
==
Command line: 
g++ /tmp/g++bug.cc
==
Output: 
/tmp/g++bug.cc: In function ‘int main()’:
/tmp/g++bug.cc:11: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccklpUdO.out file, please attach this to
your bugreport.


-- 
   Summary: Internal compiler error: Segmentation fault, when
incorrectly using __attribute__ ((packed))
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vanco dot gccbugzilla at vancomaja dot com
 GCC build triplet: Configured with: ../configure --prefix=/usr --
mandir=/usr/share/
  GCC host triplet: Using built-in specs
GCC target triplet: x86_64-redhat-linux


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



[Bug c++/36794] Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread vanco dot gccbugzilla at vancomaja dot com


--- Comment #1 from vanco dot gccbugzilla at vancomaja dot com  2008-07-10 
17:33 ---
Created an attachment (id=15892)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15892&action=view)
Preprocessed source


-- 


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



[Bug c++/36794] Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread vanco dot gccbugzilla at vancomaja dot com


--- Comment #2 from vanco dot gccbugzilla at vancomaja dot com  2008-07-10 
17:34 ---
g++ -v output: 
==Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)


-- 

vanco dot gccbugzilla at vancomaja dot com changed:

   What|Removed |Added

  GCC build triplet|Configured with:|x86_64-redhat-linux
   |../configure --prefix=/usr -|
   |-mandir=/usr/share/ |
   GCC host triplet|Using built-in specs|x86_64-redhat-linux
Summary|Internal compiler error:|Internal compiler error:
   |Segmentation fault, when|Segmentation fault, when
   |incorrectly using   |incorrectly using
   |__attribute__ ((packed))|__attribute__ ((packed))


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



[Bug c++/36794] Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread vanco dot gccbugzilla at vancomaja dot com


--- Comment #4 from vanco dot gccbugzilla at vancomaja dot com  2008-07-10 
20:10 ---
(In reply to comment #3)
> >See http://bugzilla.redhat.com/bugzilla> for instructions.
> 
> Is there a reason why you filed this bug with us when you are using a modified
> GCC from redhat?
> 

None. I just thought this is the proper place to file it. 

Please feel free to ignore this problem - it's just something that I noticed
while I was playing with __attribute__ ((packed)). 


-- 


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



[Bug c++/36794] Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread vanco dot gccbugzilla at vancomaja dot com


--- Comment #6 from vanco dot gccbugzilla at vancomaja dot com  2008-07-11 
00:28 ---
(In reply to comment #5)
> Subject: Re:  Internal compiler error: Segmentation fault, when 
>  incorrectly using __attribute__ ((packed))
> 
> 
> > None. I just thought this is the proper place to file it.
> > 
> > Please feel free to ignore this problem - it's just something that I noticed
> > while I was playing with __attribute__ ((packed)).
> 
> This is the place to report it if you can reproduce it with stock gcc. 
> What Andrew is saying is that Redhat adds an unknown amount of changes
> to their gcc which is why they also change the bug reporting location
> string from gcc bugzilla to their own Redhat bugzilla.  You can't expect
> gcc developers to be interested in tracking down bugs in a gcc modified
> with somebody else's random patches.
> 

Just trying to be helpful. Not expecting you guys to fix it... Please ignore...


-- 


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