Bug 76008 - bit fileds in derived class cause gcc to fail
Summary: bit fileds in derived class cause gcc to fail
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-15 18:44 UTC by Yue Luo
Modified: 2007-04-18 16:47 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-12-16 01:32:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Yue Luo 2002-10-15 18:44:40 UTC
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:
Always

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 {
public:
  int b1:2;
  int b2:1;
};

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

int main(){
  bitf1 a;
  a.m1=1;
  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-16 01:32:02 UTC
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.