On 1/9/20 4:07 PM, Richard Sandiford wrote:
> Stam Markianos-Wright <[email protected]> writes:
>> diff --git a/gcc/testsuite/g++.target/aarch64/bfloat_cpp_typecheck.C
>> b/gcc/testsuite/g++.target/aarch64/bfloat_cpp_typecheck.C
>> new file mode 100644
>> index 00000000000..55cbb0b0ef7
>> --- /dev/null
>> +++ b/gcc/testsuite/g++.target/aarch64/bfloat_cpp_typecheck.C
>> @@ -0,0 +1,14 @@
>> +/* { dg-do assemble { target { aarch64*-*-* } } } */
>> +/* { dg-require-effective-target arm_v8_2a_bf16_neon_ok } */
>> +/* { dg-add-options arm_v8_2a_bf16_neon } */
>> +/* { dg-additional-options "-O3 --save-temps" } */
>> +
>> +#include <arm_neon.h>
>> +
>> +void foo (void)
>> +{
>> + bfloat16_t (); /* { dg-error {invalid conversion to type 'bfloat16_t'} ""
>> {target *-*-*} } */
>
> The "" {target *-*-*} stuff isn't needed: that's just for when the test
> depends on a target selector or if you need to specify a line number
> (which comes after the target).
Ah ok cool. I just had something that worked and was just doing ctrl+c ctrl+v
everywhere!
>
> Same for the rest of the patch.
>
>> + bfloat16_t a = bfloat16_t(); /* { dg-error {invalid conversion to type
>> 'bfloat16_t'} "" {target *-*-*} } */
>
> Why's this one an error? Looks like it should be OK. Do we build
> bfloat16_t() as a conversion from a zero integer?
>
Yea that's exactly what it looked like when I went into the debugging! But will
investigate a bit further and see if I can fix it for the next revision.
Thank you so much for the help in getting these fixed :D
Cheers,
Stam
> Looks good otherwise, thanks, but I think we should try to support
> the line above if we can.
>
> Richard
>