public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c
@ 2002-10-09  5:29 D.Venkatasubramanian, Noida
  2002-10-09 20:42 ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: D.Venkatasubramanian, Noida @ 2002-10-09  5:29 UTC (permalink / raw)
  To: 'gcc@gcc.gnu.org', 'gcc-patches@gcc.gnu.org'
  Cc: D.Venkatasubramanian, Noida

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c
  2002-10-09  5:29 [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c D.Venkatasubramanian, Noida
@ 2002-10-09 20:42 ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2002-10-09 20:42 UTC (permalink / raw)
  To: D.Venkatasubramanian, Noida
  Cc: 'gcc@gcc.gnu.org', 'gcc-patches@gcc.gnu.org'

On Wed, Oct 09, 2002 at 02:06:46PM +0530, D.Venkatasubramanian, Noida wrote:
> 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.

So why does your patch mention H8 at all, instead of
disabling this test for all 16 bit targets?


r~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c
@ 2002-10-10  8:47 D.Venkatasubramanian, Noida
  0 siblings, 0 replies; 4+ messages in thread
From: D.Venkatasubramanian, Noida @ 2002-10-10  8:47 UTC (permalink / raw)
  To: Richard Henderson
  Cc: 'gcc@gcc.gnu.org', 'gcc-patches@gcc.gnu.org'


> -----Original Message-----
> From: Richard Henderson [mailto:rth@redhat.com]
> Sent: Thursday, October 10, 2002 3:13 AM
> To: D.Venkatasubramanian, Noida
> Cc: 'gcc@gcc.gnu.org'; 'gcc-patches@gcc.gnu.org'
> Subject: Re: [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c
> 
> 
> On Wed, Oct 09, 2002 at 02:06:46PM +0530, 
> D.Venkatasubramanian, Noida wrote:
> > 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.
> 
> So why does your patch mention H8 at all, instead of
> disabling this test for all 16 bit targets?
> 
> 
> r~
> 
In the patch, I have tried to identify the 16-bit target 
through the INT_MAX macro. If I had done #if INT_MAX < 32767,
then I could have precluded all targets with 16 bit integers.
I didn't do it as, atleast theoretically, some target may have
16 bit integers, while having say, a 32-bit address sizes (though,
I do really think this is higly impossible). So,this test case
shouldn't be disabled for such targets. On the other side of the 
coin, again, a 32 bit integer and 16 bit address size is possible.
I precluded H8 only, as these weren't the case here.

The problem lies in an array of 200 / 400 MB being created in the
test case.

Please tell me #if INT_MAX < 32767 is OK. I will resubmit the changed
patch.

Thanks and Regards,

Venky

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c
@ 2002-10-04  3:47 D.Venkatasubramanian, Noida
  0 siblings, 0 replies; 4+ messages in thread
From: D.Venkatasubramanian, Noida @ 2002-10-04  3:47 UTC (permalink / raw)
  To: D.Venkatasubramanian, Noida, 'gcc@gcc.gnu.org', gcc-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-10-10  6:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-09  5:29 [PATCH] for gcc/testsuite/gcc.dg/20020219-1.c D.Venkatasubramanian, Noida
2002-10-09 20:42 ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2002-10-10  8:47 D.Venkatasubramanian, Noida
2002-10-04  3:47 D.Venkatasubramanian, Noida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).