blob: 12afc97ed50a8b97096102ed6e2349997b37350a [file] [log] [blame]
/* Test for #prama target macros. */
/* { dg-do compile } */
/* { dg-require-effective-target arm_thumb1_ok } */
#pragma GCC target ("thumb")
#ifndef __thumb__
#error "__thumb__ is not defined"
#endif
#ifdef __thumb2__
#ifndef __ARM_32BIT_STATE
#error "__ARM_32BIT_STATE is not defined"
#endif
#else /* thumb1 */
#ifdef __ARM_32BIT_STATE
#error "__ARM_32BIT_STATE is defined"
#endif
#endif /* thumb1 */
#pragma GCC target ("arm")
#ifdef __thumb__
#error "__thumb__ is defined"
#endif
#if defined (__thumb2__) || defined (__thumb1__)
#error "thumb is defined"
#endif
#ifndef __ARM_32BIT_STATE
#error "__ARM_32BIT_STATE is not defined"
#endif
#pragma GCC reset_options