Patchwork [PR43920,8/9] Cross-jumping - Extend search scope - test case.

login
register
mail settings
Submitter Tom de Vries
Date April 1, 2011, 3:18 p.m.
Message ID <4D95ECBC.7080709@codesourcery.com>
Download mbox | patch
Permalink /patch/89290/
State New
Headers show

Comments

Tom de Vries - April 1, 2011, 3:18 p.m.
On 04/01/2011 05:01 PM, Jakub Jelinek wrote:
> On Fri, Apr 01, 2011 at 04:56:10PM +0200, Tom de Vries wrote:
>> Reposting, with ChangeLog.
> 
>> 2011-04-01  Tom de Vries  <tom@codesourcery.com>
>>
>> 	PR target/43920
>> 	* testsuite/gcc.target/arm/pr43920-2.c: New test.
> 
> gcc/testsuite/ has its own ChangeLog, so the ChangeLog entry
> should say just
> 	* gcc.target/arm/pr43920-2.c: New test.
> 
> 	Jakub

Fixed ChangeLog.

Thanks,
- Tom
Jeff Law - April 5, 2011, 9:45 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/01/11 09:18, Tom de Vries wrote:
> On 04/01/2011 05:01 PM, Jakub Jelinek wrote:
>> On Fri, Apr 01, 2011 at 04:56:10PM +0200, Tom de Vries wrote:
>>> Reposting, with ChangeLog.
>>
>>> 2011-04-01  Tom de Vries  <tom@codesourcery.com>
>>>
>>> 	PR target/43920
>>> 	* testsuite/gcc.target/arm/pr43920-2.c: New test.
>>
>> gcc/testsuite/ has its own ChangeLog, so the ChangeLog entry
>> should say just
>> 	* gcc.target/arm/pr43920-2.c: New test.
>>
>> 	Jakub
> 
> Fixed ChangeLog.
> 
> Thanks,
> - Tom
> 	PR target/43920
> 	* gcc.target/arm/pr43920-2.c: New test.
OK.

jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNm42LAAoJEBRtltQi2kC7TGoIAIiabS2pihIf1B6DACMOwQJ5
RRdM5bsWDlEJO6K2u54IMrt4Fmp9j2QT2DpLpU1Sv+QNdpuwfVvTLkwVs2Q0XZTK
YeKjTWfVAuKphr+aeb8PA5/7sfOaGXyWf9WC3N3kKn9E9I1mvVoT0+GXhLgejt0G
PeU/zYRri8JEZcrfOpvAzOHl1NQKXDqt3JKb2ReEvmMFCFiiM56JYks+jtxHmzR5
J4HFsa31kPKej3ljn9PDY9QfMsxJJtfEX2gEF58HVsRPQJBuCIOimrQ5vso+G66D
VXFtsS1nXcMo8aYQ6rM8+TSp2mY+tAPYTcTh0VSHdTlPoEj1tbCKN4Xq97a1oRk=
=5aQb
-----END PGP SIGNATURE-----

Patch

2011-04-01  Tom de Vries  <tom@codesourcery.com>

	PR target/43920
	* gcc.target/arm/pr43920-2.c: New test.

Index: gcc/testsuite/gcc.target/arm/pr43920-2.c
===================================================================
--- gcc/testsuite/gcc.target/arm/pr43920-2.c	(revision 0)
+++ gcc/testsuite/gcc.target/arm/pr43920-2.c	(revision 0)
@@ -0,0 +1,28 @@ 
+/* { dg-do compile } */
+/* { dg-options "-march=armv7-a -mthumb -Os" } */
+
+#include <stdio.h>
+
+int getFileStartAndLength (int fd, int *start_, size_t *length_)
+{
+      int start, end;
+      size_t length;
+
+      start = lseek (fd, 0L, SEEK_CUR);
+      end = lseek (fd, 0L, SEEK_END);
+
+      if (start == -1 || end == -1)
+         return -1;
+
+      length = end - start;
+      if (length == 0)
+         return -1;
+
+      *start_ = start;
+      *length_ = length;
+
+      return 0;
+}
+
+/* { dg-final { scan-assembler-times "pop" 2 } } */
+/* { dg-final { scan-assembler-times "beq" 3 } } */