public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Jeff Law <law@redhat.com>,
	Bill Schmidt <wschmidt@linux.vnet.ibm.com>,
	    gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix PR60930
Date: Fri, 25 Apr 2014 09:04:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.11.1404251058440.18709@zhemvz.fhfr.qr> (raw)
In-Reply-To: <20140425061543.GI1817@tucnak.redhat.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1136 bytes --]

On Fri, 25 Apr 2014, Jakub Jelinek wrote:

> On Thu, Apr 24, 2014 at 09:20:50PM -0600, Jeff Law wrote:
> > >	PR tree-optimization/60930
> > >	* gcc.dg/torture/pr60930.c:  New test.
> > Doesn't the test depend on long long being at least 64 bits?
> 
> But that is guaranteed by C99, isn't it?

But the testcase isn't built with -std=c99.

> 5.2.4.2.1 says:
> 
> ... Their implementation-defined values shall be equal or greater in magnitude
> (absolute value) to those shown, with the same sign.
> ...
> - maximum value for an object of type unsigned long long int ULLONG_MAX
>   18446744073709551615 // 2 64 − 1
> > 
> > What we've done for these kinds of tests in the past is:
> > 
> > if (sizeof (whatever) < needed size)
> >   exit (0);
> > 
> > Another approach would be to use an effective target test and skip
> > the test if the target doesn't have a suitable long long.  Look  in
> > testsuite/lib/target-supports.exp for the various target
> 
> If it was some other type, sure, one could use int32plus, lp64, etc.
> target, or #if __SIZEOF_type__ == ...

I suggest the latter (#if).

Ok with that change.

Thanks,
Richard.

  reply	other threads:[~2014-04-25  9:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24 16:38 Bill Schmidt
2014-04-25  3:43 ` Jeff Law
2014-04-25  6:57   ` Jakub Jelinek
2014-04-25  9:04     ` Richard Biener [this message]
2014-04-25  9:16       ` Jakub Jelinek
2014-04-25 14:18       ` Bill Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.11.1404251058440.18709@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=law@redhat.com \
    --cc=wschmidt@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).