From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4125 invoked by alias); 3 Dec 2005 19:37:36 -0000 Received: (qmail 4098 invoked by uid 48); 3 Dec 2005 19:37:35 -0000 Date: Sat, 03 Dec 2005 19:37:00 -0000 Subject: [Bug c/25246] New: [gomp] #pragma pack() inside of structure X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2005-12/txt/msg00329.txt.bz2 List-Id: #pragma pack(1) struct S { char h; int i; #pragma pack() int j; }; struct S s; void *i = &s.i, *j = &s.j; (distilled from Linux kernel) used to compile in 4.0.x, though the whole struct wasn't really packed at all (i at offset 4, j at offset 8). gomp #pragma handling rejects this. Another testcase is: #pragma pack(1) struct S { char h; struct T { int h1; char h2[3]; } t; int i; #pragma pack() int j; }; struct S s; void *i = &s.i, *j = &s.j; void *h1 = &s.t.h1, *h2 = &s.t.h2[0]; Here, h1 was s+1, h2 s+5, i s+8 and j s+12, i.e. struct T used to be packed and struct S wasn't packed. -- Summary: [gomp] #pragma pack() inside of structure Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: openmp Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25246