diff mbox

[SH] Add test case for PR 38621

Message ID 1342555610.2213.20.camel@yam-132-YW-E178-FTW
State New
Headers show

Commit Message

Oleg Endo July 17, 2012, 8:06 p.m. UTC
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.

Comments

Mike Stump July 17, 2012, 10:26 p.m. UTC | #1
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. UTC | #2
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
diff mbox

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;
+}
+