view gcc/testsuite/g++.target/arm/bfloat_cpp_typecheck.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line source

/* { dg-do assemble { target { arm*-*-* } } } */
/* { 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-bogus {invalid conversion to type 'bfloat16_t'} "" { xfail *-*-* } } */
  bfloat16_t a = bfloat16_t(); /* { dg-bogus {invalid conversion to type 'bfloat16_t'} "" { xfail *-*-* } } */
  bfloat16_t (0x1234); /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
  bfloat16_t (0.1); /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
}