Re: test for excess errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



naveen yadav <yad.naveen@xxxxxxxxx> writes:

> I have check the testcode.
>
>
>       1 /* This is from PR c/25892.  See Wpointer-sign.c for more details.  */
>       2
>       3 /* { dg-options "-Wall" } */
>       4
>       5 void foo(unsigned long* ulp); /* { dg-message "note: expected
> '\[^\n'\]*' but argument is of type '\[^\n'\]*'" "note: expected" {
> target *-*-* } 5 } */
>       6
>       7
>       8 void bar(long* lp) {
>       9   foo(lp); /* { dg-warning "differ in signedness" } */
>      10 }
>
>
> so why this fail

No idea.  Are you working with the original poster?  If you are, I
suppose the first thing I would check would be the version of DejaGNU.

Ian


> On Tue, Aug 17, 2010 at 7:35 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
>> paladin tripathi <paladin.tripathi@xxxxxxxxx> writes:
>>
>>> I am trying to test gcc testsuite on target in some test cases i am
>>> getting the following logs
>>>
>>> Executing on host: arm-none-linux-gnueabi-gcc
>>> ./gcc.dg/Wpointer-sign-Wall.c   -Wall -S  -o Wpointer-sign-Wall.s
>>> (timeout = 300)
>>> pid is 15130 -15130
>>> ./gcc.dg/Wpointer-sign-Wall.c: In function 'bar':
>>> ./gcc.dg/Wpointer-sign-Wall.c:9: warning: pointer targets in passing
>>> argument 1 of 'foo' differ in signedness
>>> ./gcc.dg/Wpointer-sign-Wall.c:5: note: expected 'long unsigned int *'
>>> but argument is of type 'long int *'
>>> output is ./gcc.dg/Wpointer-sign-Wall.c: In function 'bar':
>>> ./gcc.dg/Wpointer-sign-Wall.c:9: warning: pointer targets in passing
>>> argument 1 of 'foo' differ in signedness
>>> ./gcc.dg/Wpointer-sign-Wall.c:5: note: expected 'long unsigned int *'
>>> but argument is of type 'long int *'
>>>
>>>  output is:
>>> ./gcc.dg/Wpointer-sign-Wall.c: In function 'bar':
>>> ./gcc.dg/Wpointer-sign-Wall.c:9: warning: pointer targets in passing
>>> argument 1 of 'foo' differ in signedness
>>> ./gcc.dg/Wpointer-sign-Wall.c:5: note: expected 'long unsigned int *'
>>> but argument is of type 'long int *'
>>>
>>> PASS: gcc.dg/Wpointer-sign-Wall.c  (test for warnings, line 9)
>>> FAIL: gcc.dg/Wpointer-sign-Wall.c (test for excess errors)
>>>
>>>
>>> Could some one explain me what is this "test for excess errors"
>>> is this run time error or compile time error
>>
>> DejaGNU, which is what the gcc testsuite uses, is verifying that there
>> are no unexpected errors.  Failing the "test for excess errors" means
>> that the test generated an unexpected error.
>>
>> In this case the problem appears to be that the test case does not
>> expect the message at line 5.  When I look at the test case in current
>> gcc sources, I see that the message on line 5 is expected.  So I would
>> guess that you are using a newer gcc with an older testsuite, or some
>> such mismatch.
>>
>> Ian
>>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux