>>> Did you verify the testcase fails before the revision that fixed it?
>>> Esp. the placement of the dg-bogus looks bogus to me.
>>
>> I tried it on Linaro 4.9 (It should be the same in fsf gcc 4.9 branch)
>> and the test cases is failing there. Passes on trunk.
>
> Well, it probably fails because of excess errors, not because of
> the dg-bogus failing. The dg-bogus has to be on the line that
> the warning triggers on.
It was indeed excess errors and I wrongly assumed that this was the
error I should expect. I have now moved the dg-bogus to the place where
warning is being generated and verified that I am getting the error from
test for bogus messages.
>
>> In any case, I have moved it to the top and reverified. I have also
>> trimmed the warning pattern to check as there was some changes there
>> from 4.9 to trunk.
>>
>>>
>>> Also don't use -S in dg-options, use lower-case filenames and
>>> avoid spurious vertical white-space. The VRP dump scan is
>>> also very unspecific - I suggest to drop it entirely.
>>>
>>
>> Done.
>>
>>
>> Is this OK?
>
> Err.
>
> @@ -0,0 +1,24 @@
> +
>
> Excessive vertical space
>
> +/* { dg-do compile } */
> +/* { dg-options "-Wstrict-overflow -O2" } */
> +/* { dg-bogus "assuming signed overflow does not occur when simplifying" */
> +
I have fixed it.
Is this OK?
Thanks,
Kugan
diff --git a/gcc/testsuite/gcc.dg/pr52904.c b/gcc/testsuite/gcc.dg/pr52904.c
index e69de29..107d89e 100644
--- a/gcc/testsuite/gcc.dg/pr52904.c
+++ b/gcc/testsuite/gcc.dg/pr52904.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-Wstrict-overflow -O2" } */
+extern int foo (int);
+
+int
+wait_reading_process_output (void)
+{
+ int nfds = 0;
+ int channel;
+
+ for (channel = 0; channel < 1024; ++channel)
+ {
+ if (foo (channel))
+ nfds++;
+ }
+
+ if (nfds < 0) /* { dg-bogus "assuming signed overflow does not occur" } */
+ return 1;
+ return 0;
+}