This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c
- From: "D.Venkatasubramanian, Noida" <dvenkat at noida dot hcltech dot com>
- To: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>, "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Cc: "D.Venkatasubramanian, Noida" <dvenkat at noida dot hcltech dot com>
- Date: Wed, 9 Oct 2002 14:06:46 +0530
- Subject: RE: [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c
Hi All,
In reference to my earlier patch that I sent for this test case,
I felt at that time too that this patch makes too many changes which
are H8 specific. I would have prefered to do the same thing through
some dg command, which would help me to disable the test case for
h8300-elf when invoked without 32 bit support (like not finding the
-mint32 flag when the compiler is invoked), without resorting to this
unwieldy procedure. I did run through the dg commands used in various
test cases without much success.
Could someone suggest better ways to do this, it would be very useful
for some other test cases too and also for some more targets.
Regards,
Venky
-----Original Message-----
From: D.Venkatasubramanian, Noida
Sent: Friday, October 04, 2002 12:37 PM
To: D.Venkatasubramanian, Noida; 'gcc@gcc.gnu.org';
gcc-patches@gcc.gnu.org
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