This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[PATCH] for gcc/testsuite/gcc.dg/20020219-1.c
- From: "D.Venkatasubramanian, Noida" <dvenkat at noida dot hcltech dot com>
- To: "D.Venkatasubramanian, Noida" <dvenkat at noida dot hcltech dot com>, "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 4 Oct 2002 12:36:39 +0530
- Subject: [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c
Hi,
I found the test case gcc/testsuite/gcc.dg/20020219-1.c producing
compilation
warnings when I compiled it with an h8300-elf cross-compiler built on an
ix86
host with a -mh option. On investigation, I found an array a being declared
the size of which is too large for the 16 bit target. When I supply -mh
-mint32,
it works fine. By this patch, I preclude H8300 16 bit targets.
As the test case is supposed to produce an executable, a simple main
function
is definedfor those targets.
Could anyone suggest some better way to do the same thing, probably by using
dg commands.
Thanks and regards,
Venky
Entry for Change Log
Fri Oct 4 12:49:58 IST 2002 D.Venkatasubramanian
<dvenkat@noida.hcltech.com>
* gcc.dg/20020411-1.c : The sizeof array a is too large to be
supported
by 16-bit h8300 targets.
*** gcc/testsuite/gcc.dg/20020219-1.c.orig Thu Feb 21 04:24:35 2002
--- gcc/testsuite/gcc.dg/20020219-1.c.new Fri Oct 4 12:37:41 2002
***************
*** 4,11 ****
--- 4,14 ----
/* { dg-do run } */
/* { dg-options "-O2" } */
+ #include <limits.h>
+
extern void abort (void);
extern void exit (int);
+ #if !((defined (__H8300__) || defined (__H8300H__) || defined
(__H8300S__)) && (INT_MAX <= 32767))
struct A {
int a[10000][10000];
};
*************** int main (void)
*** 26,28 ****
--- 29,37 ----
foo (x - 1, 9999);
exit (0);
}
+ #else
+ int main (void)
+ {
+ exit (0);
+ }
+ #endif