public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/25246] New: [gomp] #pragma pack() inside of structure
@ 2005-12-03 19:37 jakub at gcc dot gnu dot org
2005-12-08 8:55 ` [Bug c/25246] " jakub at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-03 19:37 UTC (permalink / raw)
To: gcc-bugs
#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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/25246] [gomp] #pragma pack() inside of structure
2005-12-03 19:37 [Bug c/25246] New: [gomp] #pragma pack() inside of structure jakub at gcc dot gnu dot org
@ 2005-12-08 8:55 ` jakub at gcc dot gnu dot org
2005-12-08 8:56 ` jakub at gcc dot gnu dot org
2005-12-08 8:57 ` jakub at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-08 8:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2005-12-08 08:55 -------
Subject: Bug 25246
Author: jakub
Date: Thu Dec 8 08:55:44 2005
New Revision: 108219
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108219
Log:
PR c/25246
* c-parser.c (c_parser_struct_or_union_specifier,
c_parser_objc_class_instance_variables): Handle #pragma
at struct or class scope.
* gcc.target/i386/pr25246.c: New test.
Added:
branches/gomp-20050608-branch/gcc/testsuite/gcc.target/i386/pr25246.c
Modified:
branches/gomp-20050608-branch/gcc/ChangeLog.gomp
branches/gomp-20050608-branch/gcc/c-parser.c
branches/gomp-20050608-branch/gcc/testsuite/ChangeLog.gomp
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25246
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/25246] [gomp] #pragma pack() inside of structure
2005-12-03 19:37 [Bug c/25246] New: [gomp] #pragma pack() inside of structure jakub at gcc dot gnu dot org
2005-12-08 8:55 ` [Bug c/25246] " jakub at gcc dot gnu dot org
@ 2005-12-08 8:56 ` jakub at gcc dot gnu dot org
2005-12-08 8:57 ` jakub at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-08 8:56 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-12-08 08:56:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25246
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/25246] [gomp] #pragma pack() inside of structure
2005-12-03 19:37 [Bug c/25246] New: [gomp] #pragma pack() inside of structure jakub at gcc dot gnu dot org
2005-12-08 8:55 ` [Bug c/25246] " jakub at gcc dot gnu dot org
2005-12-08 8:56 ` jakub at gcc dot gnu dot org
@ 2005-12-08 8:57 ` jakub at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-12-08 8:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2005-12-08 08:57 -------
Fixed in CVS.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |12/msg00567.html
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25246
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-12-08 8:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-03 19:37 [Bug c/25246] New: [gomp] #pragma pack() inside of structure jakub at gcc dot gnu dot org
2005-12-08 8:55 ` [Bug c/25246] " jakub at gcc dot gnu dot org
2005-12-08 8:56 ` jakub at gcc dot gnu dot org
2005-12-08 8:57 ` jakub at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).