Patchwork [SH] Add test case for PR 38621

login
register
mail settings
Submitter Oleg Endo
Date July 17, 2012, 8:06 p.m.
Message ID <1342555610.2213.20.camel@yam-132-YW-E178-FTW>
Download mbox | patch
Permalink /patch/171553/
State New
Headers show

Comments

Oleg Endo - July 17, 2012, 8:06 p.m.
Hello,

The attached patch adds the test case from comment #3 of PR 38621 to the
test suite.

Tested with
make check-gcc RUNTESTFLAGS="compile.exp=pr38621.c --target_board=sh-sim
\{-m2/-ml,-m2/-mb,-m2a/-mb,-m2a-single/-mb,-m4/-ml,-m4/-mb,-m4-single/-ml,
-m4-single/-mb,-m4a-single/-ml,-m4a-single/-mb}"

OK?

Cheers,
Oleg

testsuite/ChangeLog:

	target PR/38621
	* gcc.c-torture/compile/pr38621.c: New.
Mike Stump - July 17, 2012, 10:26 p.m.
On Jul 17, 2012, at 1:06 PM, Oleg Endo wrote:
> The attached patch adds the test case from comment #3 of PR 38621 to the
> test suite.
> 
> Tested with
> make check-gcc RUNTESTFLAGS="compile.exp=pr38621.c --target_board=sh-sim
> \{-m2/-ml,-m2/-mb,-m2a/-mb,-m2a-single/-mb,-m4/-ml,-m4/-mb,-m4-single/-ml,
> -m4-single/-mb,-m4a-single/-ml,-m4a-single/-mb}"
> 
> OK?

Gosh, the code looks so, portable.  :-)

Ok.  I'd say nix the blank line at the end of the file.
Oleg Endo - July 18, 2012, 7:57 a.m.
On Tue, 2012-07-17 at 15:26 -0700, Mike Stump wrote:
> On Jul 17, 2012, at 1:06 PM, Oleg Endo wrote:
> > The attached patch adds the test case from comment #3 of PR 38621 to the
> > test suite.
> > 
> > Tested with
> > make check-gcc RUNTESTFLAGS="compile.exp=pr38621.c --target_board=sh-sim
> > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m2a-single/-mb,-m4/-ml,-m4/-mb,-m4-single/-ml,
> > -m4-single/-mb,-m4a-single/-ml,-m4a-single/-mb}"
> > 
> > OK?
> 
> Gosh, the code looks so, portable.  :-)
> 
> Ok.  I'd say nix the blank line at the end of the file.

Committed without the blank line as rev 189605.

Cheers,
Oleg

Patch

Index: gcc/testsuite/gcc.c-torture/compile/pr38621.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr38621.c	(revision 0)
+++ gcc/testsuite/gcc.c-torture/compile/pr38621.c	(revision 0)
@@ -0,0 +1,17 @@ 
+/* PR target/38621  */
+struct s
+{
+  char a[512];
+  int b;
+  int c;
+};
+
+long long
+foo (struct s *p, int m, int r)
+{
+  if (r == m)
+    p->b = 3;
+  p->c = 1;
+  return m;
+}
+