This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


-----Original Message-----
From: D.Venkatasubramanian, Noida 
Sent: Friday, October 04, 2002 12:37 PM
To: D.Venkatasubramanian, Noida; '';
Subject: [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c


I found the test case gcc/testsuite/gcc.dg/20020219-1.c producing
warnings when I compiled it with an h8300-elf cross-compiler built on an
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
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
is definedfor those targets.

Could anyone suggest some better way to do the same thing, probably by using
dg commands.

Thanks and regards,


Entry for Change Log

Fri Oct  4 12:49:58 IST 2002  D.Venkatasubramanian

        * gcc.dg/20020411-1.c : The sizeof array a is too large to be
          by 16-bit h8300 targets.

*** gcc/testsuite/gcc.dg/20020219-1.c.orig      Thu Feb 21 04:24:35 2002
--- gcc/testsuite/gcc.dg/       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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]