* [PATCH, testsuit] Add tests for PR33009
@ 2008-03-03 13:38 Gabor Loki
2008-03-05 2:19 ` Ian Lance Taylor
2008-03-07 19:50 ` David Daney
0 siblings, 2 replies; 5+ messages in thread
From: Gabor Loki @ 2008-03-03 13:38 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
Hi,
This patch adds some trivial checks for -frtl-abstract-sequences.
Inspired by PR33009.
Ok for trunk?
--Gabor
2007-03-03 Gabor Loki <loki@gcc.gnu.org>
PR 33009
* gcc.c-torture/compile/pr11832.c: Check -frtl-abstract-sequences.
* gcc.c-torture/compile/pr33009.c: Likewise.
[-- Attachment #2: PR33009-test.patch --]
[-- Type: text/x-patch, Size: 1722 bytes --]
Index: gcc/testsuite/gcc.c-torture/compile/pr33009.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr33009.c (revision 0)
+++ gcc/testsuite/gcc.c-torture/compile/pr33009.c (revision 0)
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-options "-frtl-abstract-sequences" } */
+
+char *progName;
+int bar0 (char *, ...);
+void bar1 (char *);
+void exit (int);
+
+
+#define SAME \
+ bar0 ("%s: Bad flag `%s'\n", argv[i], argv[i] );\
+ bar1 ( progName ); \
+ exit ( 1 );
+
+
+int foo ( int argc, char *argv[] )
+{
+ int i;
+ for (i = 0; i < argc; i++) {
+ switch (argv[i][0]) {
+ case 'c':
+ break;
+ default:
+
+ SAME
+
+ break;
+ }
+ }
+ for (i = 0; i < argc; i++) {
+
+ SAME
+
+ }
+ return 0;
+}
Index: gcc/testsuite/gcc.c-torture/compile/pr11832.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr11832.c (revision 0)
+++ gcc/testsuite/gcc.c-torture/compile/pr11832.c (revision 0)
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-frtl-abstract-sequences" } */
+
+int a, b, e;
+unsigned char *c;
+void foo()
+{
+ int d = 13;
+ b = -1;
+ switch (e) {
+ case 1:
+ b++; c[b] = (unsigned char)d;
+ break;
+ case 2:
+ b++; c[b] = (unsigned char)d;
+ b++; c[b] = (unsigned char)d;
+ break;
+ case 3:
+ b++; c[b] = (unsigned char)d;
+ b++; c[b] = (unsigned char)d;
+ b++; c[b] = (unsigned char)d;
+ break;
+ default:
+ a = 1;
+ b++; c[b] = (unsigned char)d;
+ b++; c[b] = (unsigned char)d;
+ b++; c[b] = (unsigned char)d;
+ b++; c[b] = (unsigned char)d;
+ }
+}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH, testsuit] Add tests for PR33009
2008-03-03 13:38 [PATCH, testsuit] Add tests for PR33009 Gabor Loki
@ 2008-03-05 2:19 ` Ian Lance Taylor
2008-03-11 5:53 ` David Daney
2008-03-07 19:50 ` David Daney
1 sibling, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2008-03-05 2:19 UTC (permalink / raw)
To: Gabor Loki; +Cc: GCC Patches
Gabor Loki <loki@inf.u-szeged.hu> writes:
> 2007-03-03 Gabor Loki <loki@gcc.gnu.org>
>
> PR 33009
> * gcc.c-torture/compile/pr11832.c: Check -frtl-abstract-sequences.
> * gcc.c-torture/compile/pr33009.c: Likewise.
This is OK.
Thanks.
Ian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH, testsuit] Add tests for PR33009
2008-03-05 2:19 ` Ian Lance Taylor
@ 2008-03-11 5:53 ` David Daney
2008-03-11 9:51 ` Gabor Loki
0 siblings, 1 reply; 5+ messages in thread
From: David Daney @ 2008-03-11 5:53 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: Gabor Loki, GCC Patches
Ian Lance Taylor wrote:
> Gabor Loki <loki@inf.u-szeged.hu> writes:
>
>
>> 2007-03-03 Gabor Loki <loki@gcc.gnu.org>
>>
>> PR 33009
>> * gcc.c-torture/compile/pr11832.c: Check -frtl-abstract-sequences.
>> * gcc.c-torture/compile/pr33009.c: Likewise.
>>
>
> This is OK.
>
These tests are failing on almost all targets except i686 and x86_64.
Should we just xfail them, or is someone likely to fix rtl-factoring?
On mips the failure is in compute_init_costs where the result of
make_jump_insn_raw doesn't match any insns so computing its length
ICEs. I have not looked an any other targets.
David Daney
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH, testsuit] Add tests for PR33009
2008-03-11 5:53 ` David Daney
@ 2008-03-11 9:51 ` Gabor Loki
0 siblings, 0 replies; 5+ messages in thread
From: Gabor Loki @ 2008-03-11 9:51 UTC (permalink / raw)
To: David Daney; +Cc: Ian Lance Taylor, GCC Patches
David Daney wrote:
>>> * gcc.c-torture/compile/pr11832.c: Check -frtl-abstract-sequences.
>>> * gcc.c-torture/compile/pr33009.c: Likewise.
>>>
> These tests are failing on almost all targets except i686 and x86_64.
>
> Should we just xfail them, or is someone likely to fix rtl-factoring?
Maybe, but I am working on this topic.
More info and a possible fix can be found at PR33642.
> On mips the failure is in compute_init_costs where the result of
> make_jump_insn_raw doesn't match any insns so computing its length
> ICEs. I have not looked an any other targets.
Thanks your report.
As I see on mips-elf, the last patch from PR33642 fixed this problem.
-- Gabor Loki
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH, testsuit] Add tests for PR33009
2008-03-03 13:38 [PATCH, testsuit] Add tests for PR33009 Gabor Loki
2008-03-05 2:19 ` Ian Lance Taylor
@ 2008-03-07 19:50 ` David Daney
1 sibling, 0 replies; 5+ messages in thread
From: David Daney @ 2008-03-07 19:50 UTC (permalink / raw)
To: Gabor Loki; +Cc: GCC Patches, Richard Sandiford
Gabor Loki wrote:
> Hi,
>
> This patch adds some trivial checks for -frtl-abstract-sequences.
> Inspired by PR33009.
>
> Ok for trunk?
>
> --Gabor
>
>
> 2007-03-03 Gabor Loki <loki@gcc.gnu.org>
>
> PR 33009
> * gcc.c-torture/compile/pr11832.c: Check -frtl-abstract-sequences.
> * gcc.c-torture/compile/pr33009.c: Likewise.
>
>
Both of these are ICEing on mipsel-linux.
C test results were clean before your patch:
http://gcc.gnu.org/ml/gcc-testresults/2008-03/msg00521.html
http://gcc.gnu.org/ml/gcc-testresults/2008-03/msg00302.html
David Daney
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-03-11 9:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-03 13:38 [PATCH, testsuit] Add tests for PR33009 Gabor Loki
2008-03-05 2:19 ` Ian Lance Taylor
2008-03-11 5:53 ` David Daney
2008-03-11 9:51 ` Gabor Loki
2008-03-07 19:50 ` David Daney
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).