Bug 23610 - obj-c++.dg/bitfield-[14].mm, obj-c++.dg/layout-1.mm fails with the GNU runtime
Summary: obj-c++.dg/bitfield-[14].mm, obj-c++.dg/layout-1.mm fails with the GNU runtime
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: objc++ (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-29 03:36 UTC by Andrew Pinski
Modified: 2020-11-29 23:59 UTC (History)
7 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.1.3, 4.2.4, 4.3.0, 8.0
Last reconfirmed: 2017-07-23 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2005-08-29 03:36:39 UTC
obj-c++.dg/bitfield-1.mm fails by giving these extra warnings:
In file included from <built-in>:0:
<built-in>:0: warning: padding struct to align '<anonymous struct>::<anonymous>'
<built-in>:0: warning: padding struct to align '<anonymous struct>::<anonymous>'/home/pinskia/
src/onetest/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:40: warning: padding struct size to 
alignment boundary/home/pinskia/src/onetest/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:43: 
warning: padding struct size to alignment boundary/home/pinskia/src/onetest/gcc/gcc/testsuite/obj-
c++.dg/bitfield-1.mm:57: warning: padding struct size to alignment boundary
/home/pinskia/src/onetest/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:60: warning: padding struct 
size to alignment boundary
/home/pinskia/src/onetest/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:75: warning: padding struct 
size to alignment boundary
/home/pinskia/src/onetest/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:76: warning: padding struct 
size to alignment boundary
Comment 1 Andrew Pinski 2005-08-29 03:37:54 UTC
Likewise for obj-c++.dg/bitfield-4.mm:
In file included from <built-in>:0:
<built-in>:0: warning: padding struct to align '<anonymous struct>::<anonymous>'
<built-in>:0: warning: padding struct to align '<anonymous struct>::<anonymous>'
/home/pinskia/src/onetest/gcc/gcc/testsuite/obj-c++.dg/bitfield-4.mm:29: warning: padding struct 
size to alignment boundary
/home/pinskia/src/onetest/gcc/gcc/testsuite/obj-c++.dg/bitfield-4.mm:35: warning: padding struct 
size to alignment boundary
Comment 2 Andrew Pinski 2005-08-29 03:42:17 UTC
obj-c++.dg/layout-1.mm fails the same way:
In file included from <built-in>:0:
<built-in>:0: warning: padding struct to align '<anonymous struct>::<anonymous>'
<built-in>:0: warning: padding struct to align '<anonymous struct>::<anonymous>'
Comment 3 Andrew Pinski 2005-08-31 15:45:27 UTC
Confirmed based on:
http://gcc.gnu.org/ml/gcc-testresults/2005-08/msg01653.html

fails only on 64bit targets.
Comment 4 Christian Joensson 2005-10-09 20:59:56 UTC
Also here... http://gcc.gnu.org/ml/gcc/2005-10/msg00198.html
Comment 5 John David Anglin 2006-10-16 22:28:39 UTC
Also fails on hppa2.0w-hp-hpux11.11 (32-bit).
Comment 6 John David Anglin 2006-10-16 22:29:50 UTC
Sorry, only obj-c++.dg/bitfield-1.mm fails on hppa2.0w-hp-hpux11.11.
Comment 7 John David Anglin 2007-11-22 13:57:01 UTC
Currently, with the trunk on hppa64-hp-hpux11.11, we have an ICE:

Executing on host: /test/gnu/gcc/objdir/gcc/testsuite/obj-c++/../../g++ -B/test/
gnu/gcc/objdir/gcc/testsuite/obj-c++/../../ /test/gnu/gcc/gcc/gcc/testsuite/obj-
c++.dg/bitfield-1.mm  -nostdinc++ -I/test/gnu/gcc/objdir/hppa64-hp-hpux11.11/lib
stdc++-v3/include/hppa64-hp-hpux11.11 -I/test/gnu/gcc/objdir/hppa64-hp-hpux11.11
/libstdc++-v3/include -I/test/gnu/gcc/gcc/libstdc++-v3/libsupc++ -I/test/gnu/gcc
/gcc/libstdc++-v3/include/backward -I/test/gnu/gcc/gcc/libstdc++-v3/testsuite/ut
il -fmessage-length=0  -Wpadded -Wabi -I/test/gnu/gcc/gcc/gcc/testsuite/../../li
bobjc    -L/test/gnu/gcc/objdir/hppa64-hp-hpux11.11/./libstdc++-v3/src/.libs  -L
/test/gnu/gcc/objdir/hppa64-hp-hpux11.11/./libstdc++-v3/src/.libs -L/test/gnu/gc
c/objdir/hppa64-hp-hpux11.11/./libiberty -L/test/gnu/gcc/objdir/hppa64-hp-hpux11
.11/./libobjc/.libs -lobjc -lm   -o ./bitfield-1.exe    (timeout = 300)
In file included from /test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:1
:
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:1: warning: padding str
uct to align '<anonymous struct>::<anonymous>'
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:1: warning: padding str
uct to align '<anonymous struct>::<anonymous>'
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:24: warning: padding st
ruct size to alignment boundary
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:27: warning: padding st
ruct size to alignment boundary
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:40: warning: padding st
ruct size to alignment boundary
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:43: warning: padding st
ruct size to alignment boundary
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:57: warning: padding st
ruct size to alignment boundary
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:60: warning: padding st
ruct size to alignment boundary
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:74: warning: padding st
ruct size to alignment boundary
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:75: warning: padding st
ruct size to alignment boundary
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:76: warning: padding st
ruct size to alignment boundary
/test/gnu/gcc/gcc/gcc/testsuite/obj-c++.dg/bitfield-1.mm:113: internal compiler
error: tree check: expected tree that contains 'decl with RTL' structure, have '
field_decl' in assemble_external_real, at varasm.c:2220
Comment 8 Kaveh Ghazi 2008-02-08 05:59:26 UTC
The ICE mentioned in comment#7 is a dup from PR31032.  I think this PR should focus on the excess "padding struct" warnings from the three testcases: bitfield-1.mm, bitfield-4.mm and layout-1.mm.

I see these three failures on mainline gcc-4.3 on x86_64:
http://gcc.gnu.org/ml/gcc-testresults/2008-02/msg00466.html

but not e.g. i686, so it appears to remain lp64-specific.
Comment 10 Eric Gallager 2017-07-23 20:26:54 UTC
With gcc 8.0.0 20170702 on i386-apple-darwin9.8.0 I get 3 excess warnings in 32-bit mode and 9 excess warnings in 64-bit mode when compiling the testcase manually.
Comment 11 Eric Gallager 2019-07-23 04:09:58 UTC
cc-ing Iain
Comment 12 Iain Sandoe 2019-07-23 07:28:36 UTC
(In reply to Eric Gallager from comment #11)
> cc-ing Iain

I don't see these excess errors on recent trunk [273642/273656] for i686-darwin9, powerpc-darwin9 or x86_64-linux-gnu.

For x86_64-linux-gnu the objective-c/c++ testsuite is clean for both m32 and m64.

For i686-darwin9 there are some execution failures (not yet triaged):

Running target unix/-m64
FAIL: obj-c++.dg/bitfield-2.mm -fnext-runtime execution test
FAIL: obj-c++.dg/property/synthesize-10.mm -fnext-runtime execution test

Running target unix/-m32
FAIL: objc.dg/ivar-scope-4.m -fnext-runtime execution test

Running target unix/-m64
FAIL: objc.dg/ivar-scope-4.m -fnext-runtime execution test

====

Is this something you can point to a mechanism to reproduce on trunk?

====

I plan on back-porting the ObjC* testsuite fixups made recently to the open branches.
Comment 13 Iain Sandoe 2019-07-23 07:38:56 UTC
(In reply to Iain Sandoe from comment #12)
> (In reply to Eric Gallager from comment #11)
> > cc-ing Iain
> 
> I don't see these excess errors on recent trunk [273642/273656] for
> i686-darwin9, powerpc-darwin9 or x86_64-linux-gnu.

Noting that Darwin runs the "gnu runtime" tests in addition to the NeXT ones so, unless tests are explicitly disabled, should show the results without manual intervention.