From patchwork Fri May 19 07:44:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5qKF5p2w?= X-Patchwork-Id: 96220 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1055472vqo; Fri, 19 May 2023 00:45:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ78HYhwCCgaHd9Eaxazy9E72rdL+s1qiCHIqu3B7HO27YTdPccTsekfKrLml8/JaZSjE8pU X-Received: by 2002:a17:907:6e02:b0:94f:81c:725e with SMTP id sd2-20020a1709076e0200b0094f081c725emr862140ejc.59.1684482324025; Fri, 19 May 2023 00:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684482324; cv=none; d=google.com; s=arc-20160816; b=Yuq2F4ghqeEiwfMuODNsoncIPz4tSQW5EiMM/7bmr9xvwuEdBSxfd7EyDY/RcnoV54 RZAFVeq7ugWfFMOMYzKYlXOkphpP14D96d6RVOl6kWwL2K1kFLGmypVXaoRMixRS0tr3 Mz3xwFAyiTRAMfOivM3IXCoJvc7H7uyuuYNuWicS7Tk2slr/26eKzVGZf2Kk3nr8h1Kk chV0gCe9X/+XTr5OKXAf0HdM1xK2PYrUSAJ25A+VFgQAmeB8+bBbFEka5lAYkzLSP+1E vPyXy1ao3uNJJynPKUF1KxHW4j5P9tKCwxUf8AR6zpk61tw/qDon8lQ8R6/dWC4mCnYn U4Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :message-id:subject:cc:mime-version:from:to:date:dkim-signature :dmarc-filter:delivered-to; bh=uVwunTutxd7v1os2A0sYkIan+7Fed9/4PERtHuiwKco=; b=pfV6Y1lbl3JOidugg8HXUxJESRulwV/rcvfBGn19GRKcN8HTkGlKhFy5iT/S5rJdYI bv4FnQPxUZulb5HDIEfNcv6hcW6A1hT65nyaDIMWwgl3Zpwa1P6/iBUXV+rUl9NR8be+ EwiX7X1J/Iw5DvRD2j9iDp5Ud4hoWIcbjvvvMj8uox2XPQBvElEbl5U11zO6KNeoyLVq shnyz5sIYKdCd9QyKv8lMN4uu1Aa/WySy18gKG+2J6OJc/v2i3PpxdtDVDpBq8FRVKHb HsAUj21YyhWHWPyK0iWqNm7Qp8cjYqnuWUtSzxh+/IMhOItvsmR/Zmg0yO5aRvbvktH6 7m9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@oss.cipunited.com header.s=feishu2303200042 header.b="saMt/OVl"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id dx10-20020a170906a84a00b0095f90da23b6si876040ejb.506.2023.05.19.00.45.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 00:45:24 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@oss.cipunited.com header.s=feishu2303200042 header.b="saMt/OVl"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0ABDD3853D08 for ; Fri, 19 May 2023 07:44:54 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from s01.bc.larksuite.com (s01.bc.larksuite.com [209.127.230.12]) by sourceware.org (Postfix) with UTF8SMTPS id EDB463858D28 for ; Fri, 19 May 2023 07:44:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EDB463858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=oss.cipunited.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=oss.cipunited.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2303200042; d=oss.cipunited.com; t=1684482257; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=Z2SYzlFQGBU2b0r9n8cTxztY3q4D7N2+TIVKWSY9Azo=; b=saMt/OVl4htlFBtPcidQddnAHvWkoCCgxhP/hwKYceq7TP94Fq6+F+O8XokJz8E4d7M8Z1 MtjsLdHDFLClYfix6qQfSh9DbFfSaDwcXyQOo2X9ZUeC9pPDQ1rG/ZUPTRKFt9P4Ph6AEp A2TFlgV1H9+6UypFFcox7ulmzii8BTuP+5NQ3Ed6a0xadSPAW/2C8gAgaCHlmt5kd3LCo0 TH749s6TnyZAhocUyT54zCI44IkuOrSSjSYfcsMyXuvPAq69IL1AgiMuZp4qGY14r62URs gvCG3PyGgOaaocFa0zMf6xN5RHzEUmP93AqSgHWvfB+LdsEutsvD0gH3hQr05g== Date: Fri, 19 May 2023 15:44:06 +0800 To: From: "Jie Mei" Mime-Version: 1.0 Cc: "YunQiang Su" Subject: [PATCH] MIPS16: Implement `code_readable` function attribute. Message-Id: <20230519074209.307764-1-jie.mei@oss.cipunited.com> X-Mailer: git-send-email 2.40.1 X-Lms-Return-Path: X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, GIT_PATCH_0, HTML_MESSAGE, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766307737691878158?= X-GMAIL-MSGID: =?utf-8?q?1766307737691878158?= Support for __attribute__ ((code_readable)). Takes up to one argument of "yes", "no", "pcrel". This will change the code readability setting for just that function. If no argument is supplied, then the setting is 'yes'. gcc/ChangeLog: * config/mips/mips.cc (enum mips_code_readable_setting):New enmu. (mips_handle_code_readable_attr):New static function. (mips_get_code_readable_attr):New static enum function. (mips_set_current_function):Set the code_readable mode. (mips_option_override):Same as above. * doc/extend.texi:Document code_readable. gcc/testsuite/ChangeLog: * gcc.target/mips/code-readable-attr-1.c: New test. * gcc.target/mips/code-readable-attr-2.c: New test. * gcc.target/mips/code-readable-attr-3.c: New test. * gcc.target/mips/code-readable-attr-4.c: New test. * gcc.target/mips/code-readable-attr-5.c: New test. --- gcc/config/mips/mips.cc | 97 ++++++++++++++++++- gcc/doc/extend.texi | 17 ++++ .../gcc.target/mips/code-readable-attr-1.c | 51 ++++++++++ .../gcc.target/mips/code-readable-attr-2.c | 49 ++++++++++ .../gcc.target/mips/code-readable-attr-3.c | 50 ++++++++++ .../gcc.target/mips/code-readable-attr-4.c | 51 ++++++++++ .../gcc.target/mips/code-readable-attr-5.c | 5 + 7 files changed, 319 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/mips/code-readable-attr-1.c create mode 100644 gcc/testsuite/gcc.target/mips/code-readable-attr-2.c create mode 100644 gcc/testsuite/gcc.target/mips/code-readable-attr-3.c create mode 100644 gcc/testsuite/gcc.target/mips/code-readable-attr-4.c create mode 100644 gcc/testsuite/gcc.target/mips/code-readable-attr-5.c diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index ca822758b41..97f45e67529 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -498,6 +498,9 @@ static int mips_base_target_flags; /* The default compression mode. */ unsigned int mips_base_compression_flags; +/* The default code readable setting. */ +enum mips_code_readable_setting mips_base_code_readable; + /* The ambient values of other global variables. */ static int mips_base_schedule_insns; /* flag_schedule_insns */ static int mips_base_reorder_blocks_and_partition; /* flag_reorder... */ @@ -602,6 +605,7 @@ const enum reg_class mips_regno_to_class[FIRST_PSEUDO_REGISTER] = { ALL_REGS, ALL_REGS, ALL_REGS, ALL_REGS }; +static tree mips_handle_code_readable_attr (tree *, tree, tree, int, bool *); static tree mips_handle_interrupt_attr (tree *, tree, tree, int, bool *); static tree mips_handle_use_shadow_register_set_attr (tree *, tree, tree, int, bool *); @@ -623,6 +627,8 @@ static const struct attribute_spec mips_attribute_table[] = { { "micromips", 0, 0, true, false, false, false, NULL, NULL }, { "nomicromips", 0, 0, true, false, false, false, NULL, NULL }, { "nocompression", 0, 0, true, false, false, false, NULL, NULL }, + { "code_readable", 0, 1, true, false, false, false, + mips_handle_code_readable_attr, NULL }, /* Allow functions to be specified as interrupt handlers */ { "interrupt", 0, 1, false, true, true, false, mips_handle_interrupt_attr, NULL }, @@ -1310,6 +1316,81 @@ mips_use_debug_exception_return_p (tree type) TYPE_ATTRIBUTES (type)) != NULL; } + +/* Verify the arguments to a code_readable attribute. */ + +static tree +mips_handle_code_readable_attr (tree *node ATTRIBUTE_UNUSED, tree name, + tree args, int flags ATTRIBUTE_UNUSED, + bool *no_add_attrs) +{ + if (!is_attribute_p ("code_readable", name) || args == NULL) + return NULL_TREE; + + if (TREE_CODE (TREE_VALUE (args)) != STRING_CST) + { + warning (OPT_Wattributes, + "%qE attribute requires a string argument", name); + *no_add_attrs = true; + } + else if (strcmp (TREE_STRING_POINTER (TREE_VALUE (args)), "no") != 0 + && strcmp (TREE_STRING_POINTER (TREE_VALUE (args)), "pcrel") != 0 + && strcmp (TREE_STRING_POINTER (TREE_VALUE (args)), "yes") != 0) + { + warning (OPT_Wattributes, + "argument to %qE attribute is neither no, pcrel nor yes", name); + *no_add_attrs = true; + } + + return NULL_TREE; +} + +/* Determine the code_readable setting for a function if it has one. Set + *valid to true if we have a properly formed argument and + return the result. If there's no argument, return GCC's default. + Otherwise, leave valid false and return mips_base_code_readable. In + that case the result should be unused anyway. */ + +static enum mips_code_readable_setting +mips_get_code_readable_attr (tree decl) +{ + tree attr; + + if (decl == NULL) + return mips_base_code_readable; + + attr = lookup_attribute ("code_readable", DECL_ATTRIBUTES (decl)); + + if (attr != NULL) + { + if (TREE_VALUE (attr) != NULL_TREE) + { + const char * str; + + str = TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))); + if (strcmp (str, "no") == 0) + return CODE_READABLE_NO; + else if (strcmp (str, "pcrel") == 0) + return CODE_READABLE_PCREL; + else if (strcmp (str, "yes") == 0) + return CODE_READABLE_YES; + + /* mips_handle_code_readable_attr will have verified the + arguments are correct before adding the attribute. */ + gcc_unreachable (); + } + + /* Just like GCC's default -mcode-readable= setting, the + presence of the code_readable attribute implies that a + function can read data from the instruction stream by + default. */ + return CODE_READABLE_YES; + } + + return mips_base_code_readable; +} + + /* Return the set of compression modes that are explicitly required by the attributes in ATTRIBUTES. */ @@ -19905,12 +19986,25 @@ mips_set_compression_mode (unsigned int compression_mode) /* Implement TARGET_SET_CURRENT_FUNCTION. Decide whether the current function should use the MIPS16 or microMIPS ISA and switch modes - accordingly. */ + accordingly. Also set the current code_readable mode. */ static void mips_set_current_function (tree fndecl) { + enum mips_code_readable_setting old_code_readable = mips_code_readable; + mips_set_compression_mode (mips_get_compress_mode (fndecl)); + + mips_code_readable = mips_get_code_readable_attr (fndecl); + + /* Since the mips_code_readable setting has potientially changed, the + relocation tables must be reinitialized. Otherwise GCC will not + split symbols for functions that are code_readable ("no") when others + are code_readable ("yes") and ICE later on in places such as + mips_emit_move. Ditto for similar paired cases. It must be restored + to its previous state as well. */ + if (old_code_readable != mips_code_readable) + mips_init_relocs (); } /* Allocate a chunk of memory for per-function machine-dependent data. */ @@ -20042,6 +20136,7 @@ mips_option_override (void) were generating uncompressed code. */ mips_base_compression_flags = TARGET_COMPRESSION; target_flags &= ~TARGET_COMPRESSION; + mips_base_code_readable = mips_code_readable; /* -mno-float overrides -mhard-float and -msoft-float. */ if (TARGET_NO_FLOAT) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 69b21a75e62..b48f5f55513 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -5670,6 +5670,23 @@ command line (@pxref{MIPS Options}). This function attribute instructs the compiler to generate a hazard barrier return that clears all execution and instruction hazards while returning, instead of generating a normal return instruction. + +@item code_readable +@cindex @code{code_readable} function attribute, MIPS +For MIPS targets that support PC-relative addressing modes, this attribute +can be used to control how an object is addressed. The attribute takes +a single optional argument: + +@table @samp +@item no +The function should not read the instruction stream as data. +@item yes +The function can read the instruction stream as data. +@item pcrel +The function can read the instruction stream in a pc-relative mode. +@end table + +If there is no argument supplied, the default of @code{"yes"} applies. @end table @node MSP430 Function Attributes diff --git a/gcc/testsuite/gcc.target/mips/code-readable-attr-1.c b/gcc/testsuite/gcc.target/mips/code-readable-attr-1.c new file mode 100644 index 00000000000..4ccb27c8bde --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/code-readable-attr-1.c @@ -0,0 +1,51 @@ +/* { dg-options "(-mips16) -mgp32 addressing=absolute" } */ +/* { dg-skip-if ".half requires -O" { *-*-* } { "-O0" } { "" } } */ + +volatile int x1; +volatile int x2; +volatile int x3; +volatile int x4; +volatile int x5; +volatile int x6; +volatile int x7; +volatile int x8; +volatile int x9; +volatile int x10; +volatile int x11; + +MIPS16 __attribute__ ((code_readable)) int +foo (int i, volatile int *x) +{ + switch (i) + { + case 1: return x1 + x[0]; + case 2: return x2 + x[1]; + case 3: return x3 + x[2]; + case 4: return x4 + x[3]; + case 5: return x5 + x[4]; + case 6: return x6 + x[5]; + case 7: return x7 + x[6]; + case 8: return x8 + x[7]; + case 9: return x9 + x[8]; + case 10: return x10 + x[9]; + case 11: return x11 + x[10]; + default: return 0; + } +} + +extern int k[]; + +MIPS16 __attribute__ ((code_readable)) int * +bar (void) +{ + return k; +} + +/* { dg-final { scan-assembler "\tla\t" } } */ +/* { dg-final { scan-assembler "\t\\.half\t" } } */ +/* { dg-final { scan-assembler-not "%hi\\(\[^)\]*L" } } */ +/* { dg-final { scan-assembler-not "%lo\\(\[^)\]*L" } } */ + +/* { dg-final { scan-assembler "\t\\.word\tk\n" } } */ +/* { dg-final { scan-assembler-not "%hi\\(k\\)" } } */ +/* { dg-final { scan-assembler-not "%lo\\(k\\)" } } */ diff --git a/gcc/testsuite/gcc.target/mips/code-readable-attr-2.c b/gcc/testsuite/gcc.target/mips/code-readable-attr-2.c new file mode 100644 index 00000000000..c7dd5113359 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/code-readable-attr-2.c @@ -0,0 +1,49 @@ +/* { dg-options "(-mips16) -mgp32 addressing=absolute" } */ + +volatile int x1; +volatile int x2; +volatile int x3; +volatile int x4; +volatile int x5; +volatile int x6; +volatile int x7; +volatile int x8; +volatile int x9; +volatile int x10; +volatile int x11; + +MIPS16 __attribute__((code_readable ("pcrel"))) int +foo (int i, volatile int *x) +{ + switch (i) + { + case 1: return x1 + x[0]; + case 2: return x2 + x[1]; + case 3: return x3 + x[2]; + case 4: return x4 + x[3]; + case 5: return x5 + x[4]; + case 6: return x6 + x[5]; + case 7: return x7 + x[6]; + case 8: return x8 + x[7]; + case 9: return x9 + x[8]; + case 10: return x10 + x[9]; + case 11: return x11 + x[10]; + default: return 0; + } +} + +extern int k[]; + +MIPS16 __attribute__((code_readable ("pcrel"))) int * +bar (void) +{ + return k; +} + +/* { dg-final { scan-assembler-not "\tla\t" } } */ +/* { dg-final { scan-assembler-not "\t\\.half\t" } } */ +/* { dg-final { scan-assembler "\t\\.word\t\[^\n\]*L" } } */ + +/* { dg-final { scan-assembler "\t\\.word\tk\n" } } */ +/* { dg-final { scan-assembler-not "%hi\\(k\\)" } } */ +/* { dg-final { scan-assembler-not "%lo\\(k\\)" } } */ diff --git a/gcc/testsuite/gcc.target/mips/code-readable-attr-3.c b/gcc/testsuite/gcc.target/mips/code-readable-attr-3.c new file mode 100644 index 00000000000..99c13a901bc --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/code-readable-attr-3.c @@ -0,0 +1,50 @@ +/* { dg-options "(-mips16) -mgp32 addressing=absolute" } */ + +volatile int x1; +volatile int x2; +volatile int x3; +volatile int x4; +volatile int x5; +volatile int x6; +volatile int x7; +volatile int x8; +volatile int x9; +volatile int x10; +volatile int x11; + +MIPS16 __attribute__((code_readable ("no"))) int +foo (int i, volatile int *x) +{ + switch (i) + { + case 1: return x1 + x[0]; + case 2: return x2 + x[1]; + case 3: return x3 + x[2]; + case 4: return x4 + x[3]; + case 5: return x5 + x[4]; + case 6: return x6 + x[5]; + case 7: return x7 + x[6]; + case 8: return x8 + x[7]; + case 9: return x9 + x[8]; + case 10: return x10 + x[9]; + case 11: return x11 + x[10]; + default: return 0; + } +} + +extern int k[]; + +MIPS16 __attribute__((code_readable ("no"))) int * +bar (void) +{ + return k; +} + +/* { dg-final { scan-assembler-not "\tla\t" } } */ +/* { dg-final { scan-assembler-not "\t\\.half\t" } } */ +/* { dg-final { scan-assembler "%hi\\(\[^)\]*L" } } */ +/* { dg-final { scan-assembler "%lo\\(\[^)\]*L" } } */ + +/* { dg-final { scan-assembler-not "\t\\.word\tk\n" } } */ +/* { dg-final { scan-assembler "%hi\\(k\\)" } } */ +/* { dg-final { scan-assembler "%lo\\(k\\)" } } */ diff --git a/gcc/testsuite/gcc.target/mips/code-readable-attr-4.c b/gcc/testsuite/gcc.target/mips/code-readable-attr-4.c new file mode 100644 index 00000000000..4058ba13810 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/code-readable-attr-4.c @@ -0,0 +1,51 @@ +/* { dg-options "(-mips16) -mabi=eabi -mgp64" } */ +/* { dg-skip-if ".half requires -O" { *-*-* } { "-O0" } { "" } } */ + +volatile int x1; +volatile int x2; +volatile int x3; +volatile int x4; +volatile int x5; +volatile int x6; +volatile int x7; +volatile int x8; +volatile int x9; +volatile int x10; +volatile int x11; + +MIPS16 __attribute__((code_readable ("yes"))) int +foo (int i, volatile int *x) +{ + switch (i) + { + case 1: return x1 + x[0]; + case 2: return x2 + x[1]; + case 3: return x3 + x[2]; + case 4: return x4 + x[3]; + case 5: return x5 + x[4]; + case 6: return x6 + x[5]; + case 7: return x7 + x[6]; + case 8: return x8 + x[7]; + case 9: return x9 + x[8]; + case 10: return x10 + x[9]; + case 11: return x11 + x[10]; + default: return 0; + } +} + +extern int k[]; + +MIPS16 __attribute__((code_readable ("yes"))) int * +bar (void) +{ + return k; +} + +/* { dg-final { scan-assembler "\tdla\t" } } */ +/* { dg-final { scan-assembler "\t\\.half\t" } } */ +/* { dg-final { scan-assembler-not "%hi\\(\[^)\]*L" } } */ +/* { dg-final { scan-assembler-not "%lo\\(\[^)\]*L" } } */ + +/* { dg-final { scan-assembler "\t\\.dword\tk\n" } } */ +/* { dg-final { scan-assembler-not "%hi\\(k\\)" } } */ +/* { dg-final { scan-assembler-not "%lo\\(k\\)" } } */ diff --git a/gcc/testsuite/gcc.target/mips/code-readable-attr-5.c b/gcc/testsuite/gcc.target/mips/code-readable-attr-5.c new file mode 100644 index 00000000000..0a547a9acfc --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/code-readable-attr-5.c @@ -0,0 +1,5 @@ +/* { dg-options "(-mips16) isa_rev<=5" } */ + + __attribute__((code_readable ("magic"))) int foo () {} /* { dg-warning "argument to 'code_readable' attribute is neither no, pcrel nor yes" } */ + + __attribute__((code_readable (1))) int * bar () {} /* { dg-warning "'code_readable' attribute requires a string argument" } */