Bug 76008 - bit fileds in derived class cause gcc to fail
bit fileds in derived class cause gcc to fail
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-10-15 14:44 EDT by Yue Luo
Modified: 2007-04-18 12:47 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-12-15 20:32:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Yue Luo 2002-10-15 14:44:40 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Q312461)

Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. My gcc -v shows:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-112)

2. Try complie the following program (bit_field.cc):

#include <stdio.h>
class __attribute__((packed))base {
  int b1:2;
  int b2:1;

class __attribute__((packed)) bitf1:public base{
  int m1:2;
  int m2:3;

int main(){
  bitf1 a;
  printf("sizeof(bitf1)=%d\n", sizeof (bitf1));
  return 0;

3. You will get:
bit_field.cc:8: Internal compiler error in tree_low_cst, at tree.c:4325
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

Additional info:
Comment 1 Alan Cox 2002-12-15 20:32:02 EST
Tests ok with g++ 3.2 / RH 8.0

Note You need to log in before you can comment on or make changes to this bug.