Bug 11606 - testcases gcc.dg/pack-test-1.c, gcc.dg/pack-test-2.c fail
Summary: testcases gcc.dg/pack-test-1.c, gcc.dg/pack-test-2.c fail
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.1
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-20 16:34 UTC by dank
Modified: 2012-07-02 23:37 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: sh4-*-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2005-05-26 12:35:03


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dank 2003-07-20 16:34:34 UTC
I built an x86 -> sh4 crosscompiler using http://kegel.com/crosstool
and either gcc-3.3 or gcc-ss-3_3-20030714, and am seeing 
the following testsuite failures.
The "size of array foo is negative" errors are what worry me.

FAIL: gcc.dg/pack-test-1.c (test for excess errors)
Excess errors:
...
/crosstool-0.14/build/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/gcc-ss-3_3-20030714/gcc/testsuite/gcc.dg/pack-test-1.c:44:
error: size of array `test_0' is negative
/crosstool-0.14/build/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/gcc-ss-3_3-20030714/gcc/testsuite/gcc.dg/pack-test-1.c:45:
error: size of array `test_1' is negative
/crosstool-0.14/build/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/gcc-ss-3_3-20030714/gcc/testsuite/gcc.dg/pack-test-1.c:51:
warning: #pragma pack(push[, id], <n>) is not supported on this target
...


FAIL: gcc.dg/pack-test-2.c  (test for errors, line 7)
FAIL: gcc.dg/pack-test-2.c  (test for errors, line 14)
FAIL: gcc.dg/pack-test-2.c  (test for errors, line 19)
FAIL: gcc.dg/pack-test-2.c (test for excess errors)
Excess errors:
/crosstool-0.14/build/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/gcc-ss-3_3-20030714/gcc/testsuite/gcc.dg/pack-test-2.c:7:
warning: #pragma pack(pop[, id], <n>) is not supported on this target
...
Comment 1 Andrew Pinski 2003-07-20 16:38:53 UTC
Looks like these tests should not be tested on sh4-*-linux*.
Comment 2 dank 2003-07-20 17:52:59 UTC
Are you sure the "size of array foo is negative" errors are spurious?
Comment 3 Andrew Pinski 2003-07-20 17:58:57 UTC
No I am saying "warning: #pragma pack(push[, id], <n>) is not supported on this target" is the 
excess errors so this test is not really meaning full on sh4-*-linux.
Comment 4 dank 2003-07-20 21:29:37 UTC
Right, I was just worried that the parts of the test that are supported
on sh4 might be failing.  A quick look makes me feel better - they seem
to be passing.  We could totally exclude these two tests from running on sh4,
but to be really correct, we should also extract the parts of the test that
don't use #pragma pack(push...) and put them into gcc.dg/pack-test-0.c
or something like that.
Comment 5 dank 2003-07-21 14:52:56 UTC
http://www.sh-linux.org/rpm-2003/SRPMS/gcc-3.2.3-3.src.rpm may
contain a patch that adds #pragma pack(push...) support to gcc for sh4,
so maybe the right fix is to arrange for the appropriate part
of that patch to be committed...
Comment 6 Andrew Pinski 2003-07-30 02:46:55 UTC
I can confirm this on the mainline (20030718).
Comment 7 Andrew Pinski 2003-11-23 07:05:40 UTC
Patches should go to gcc-patches@.
Comment 8 Oleg Endo 2012-07-02 23:37:59 UTC
I'm not sure since when, but at least as of rev 189180 (4.8) this problem does not occur anymore.