token_indent_info body_tinfo
= get_token_indent_info (c_parser_peek_token (parser));
tree before_labels = get_before_labels ();
+ attr_state a = c_parser_all_labels (parser);
- c_parser_all_labels (parser);
if (c_parser_next_token_is (parser, CPP_SEMICOLON))
{
location_t loc = c_parser_peek_token (parser)->location;
else
{
body_loc_after_labels = c_parser_peek_token (parser)->location;
- c_parser_statement_after_labels (parser, if_p, before_labels);
+ c_parser_statement_after_labels (parser, if_p, before_labels, NULL, a);
}
token_indent_info next_tinfo
= get_token_indent_info (c_parser_peek_token (parser));
location_t body_loc_after_labels = UNKNOWN_LOCATION;
tree before_labels = get_before_labels ();
+ attr_state a = c_parser_all_labels (parser);
- c_parser_all_labels (parser);
if (c_parser_next_token_is (parser, CPP_SEMICOLON))
{
location_t loc = c_parser_peek_token (parser)->location;
{
if (!c_parser_next_token_is (parser, CPP_OPEN_BRACE))
body_loc_after_labels = c_parser_peek_token (parser)->location;
- c_parser_statement_after_labels (parser, NULL, before_labels, chain);
+ c_parser_statement_after_labels (parser, NULL, before_labels, chain, a);
}
token_indent_info next_tinfo
/* PR tree-optimization/118430 */
/* { dg-do compile { target musttail } } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
-/* { dg-final { scan-tree-dump-times " \[^\n\r]* = bar \\\(\[^\n\r]\*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times " \[^\n\r]* = freddy \\\(\[^\n\r]\*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-not " (?:bar|freddy) \\\(\[^\n\r]\*\\\); \\\[tail call\\\]" "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \[^\n\r]* = bar \\\(\[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \[^\n\r]* = freddy \\\(\[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-not " (?:bar|freddy) \\\(\[^\n\r]*\\\); \\\[tail call\\\]" "optimized" } } */
__attribute__ ((noipa)) void
foo (int x)
--- /dev/null
+/* PR c/119311 */
+/* { dg-do compile { target musttail } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-times " \[^\n\r]* = bar \\\(\[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \[^\n\r]* = baz \\\(\[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-not " (?:bar|baz) \\\(\[^\n\r]*\\\); \\\[tail call\\\]" "optimized" } } */
+
+
+[[gnu::noipa]] int
+bar (int x, int y)
+{
+ return x + y;
+}
+
+[[gnu::noipa]] int
+baz (int x, int y)
+{
+ return x * y;
+}
+
+int
+foo (int a, int b)
+{
+ if (a > b)
+ [[gnu::musttail]] return bar (a - b, b);
+ else
+ [[gnu::musttail]] return baz (a, b - a);
+}