emission easier. */
parser->oacc_routine->clauses = nreverse (parser->oacc_routine->clauses);
cp_parser_pop_lexer (parser);
- /* Later, cp_finalize_oacc_routine will process the clauses, and then set
- fndecl_seen. */
+ /* Later, cp_finalize_oacc_routine will process the clauses. */
+ parser->oacc_routine->fndecl_seen = true;
return attrs;
}
|| fndecl == error_mark_node)
return;
- if (parser->oacc_routine->fndecl_seen)
- {
- error_at (parser->oacc_routine->loc,
- "%<#pragma acc routine%> not immediately followed by"
- " a single function declaration or definition");
- parser->oacc_routine = NULL;
- return;
- }
if (TREE_CODE (fndecl) != FUNCTION_DECL)
{
+ if (parser->oacc_routine->fndecl_seen)
+ {
+ error_at (parser->oacc_routine->loc,
+ "%<#pragma acc routine%> not immediately followed by"
+ " a single function declaration or definition");
+ parser->oacc_routine = NULL;
+ return;
+ }
+
cp_ensure_no_oacc_routine (parser);
return;
}
parser->oacc_routine->clauses,
DECL_ATTRIBUTES (fndecl));
}
-
- /* Don't unset parser->oacc_routine here: we may still need it to
- diagnose wrong usage. But, remember that we've used this "#pragma acc
- routine". */
- parser->oacc_routine->fndecl_seen = true;
}
}
If @option{-fvariable-expansion-in-unroller} is used, the maximum number
of times that an individual variable will be expanded during loop unrolling.
-@item tracer-min-branch-probability-feedback
-Stop forward growth if the probability of best edge is less than
-this threshold (in percent). Used when profile feedback is available.
-
@item partial-inlining-entry-probability
Maximum probability of the entry BB of split region
(in percent relative to entry BB of the function)
The number of cycles the swing modulo scheduler considers when checking
conflicts using DFA.
-@item max-inline-insns-recursive-auto
-The maximum number of instructions non-inline function
-can grow to via recursive inlining.
-
@item graphite-allow-codegen-errors
Whether codegen errors should be ICEs when @option{-fchecking}.
Maximum number of nested calls to search for control dependencies
during uninitialized variable analysis.
-@item sra-max-scalarization-size-Osize
-Maximum size, in storage units, of an aggregate
-which should be considered for scalarization when compiling for size.
-
@item fsm-scale-path-blocks
Scale factor to apply to the number of blocks in a threading path
when comparing to the number of (scaled) statements.
--- /dev/null
+/* PR c++/101731 */
+
+#pragma acc routine /* { dg-error "not immediately followed by a single function declaration or definition" "" { target c++ } } */
+int foo (int bar ());
#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
#endif
+#ifdef CRT_GET_RFIB_DATA
+#define NEED_DBASE_MEMBER 1
+#else
+#define NEED_DBASE_MEMBER 0
+#endif
+
struct unw_eh_callback_data
{
_Unwind_Ptr pc;
- void *tbase;
+#if NEED_DBASE_MEMBER
void *dbase;
+#endif
void *func;
const fde *ret;
int check_cache;
};
+/* Returns DATA->dbase if available, else NULL. */
+static inline _Unwind_Ptr
+unw_eh_callback_data_dbase (const struct unw_eh_callback_data *data
+ __attribute__ ((unused)))
+{
+#if NEED_DBASE_MEMBER
+ return (_Unwind_Ptr) data->dbase;
+#else
+ return 0;
+#endif
+}
+
struct unw_eh_frame_hdr
{
unsigned char version;
/* Like base_of_encoded_value, but take the base from a struct
unw_eh_callback_data instead of an _Unwind_Context. */
-static _Unwind_Ptr
-base_from_cb_data (unsigned char encoding, struct unw_eh_callback_data *data)
+static inline _Unwind_Ptr
+base_from_cb_data (unsigned char encoding __attribute__ ((unused)),
+ _Unwind_Ptr dbase __attribute__ ((unused)))
{
+#if NEED_DBASE_MEMBER
if (encoding == DW_EH_PE_omit)
return 0;
return 0;
case DW_EH_PE_textrel:
- return (_Unwind_Ptr) data->tbase;
+ return 0;
case DW_EH_PE_datarel:
- return (_Unwind_Ptr) data->dbase;
+ return dbase;
default:
gcc_unreachable ();
}
+#else /* !NEED_DBASE_MEMBER */
+ return 0;
+#endif
}
static int
# endif
#endif
+ _Unwind_Ptr dbase = unw_eh_callback_data_dbase (data);
p = read_encoded_value_with_base (hdr->eh_frame_ptr_enc,
base_from_cb_data (hdr->eh_frame_ptr_enc,
- data),
+ dbase),
(const unsigned char *) (hdr + 1),
&eh_frame);
p = read_encoded_value_with_base (hdr->fde_count_enc,
base_from_cb_data (hdr->fde_count_enc,
- data),
+ dbase),
p, &fde_count);
/* Shouldn't happen. */
if (fde_count == 0)
As soon as GLIBC will provide API so to notify that a library has been
removed, we could cache this (and thus use search_object). */
ob.pc_begin = NULL;
- ob.tbase = data->tbase;
- ob.dbase = data->dbase;
+ ob.tbase = NULL;
+ ob.dbase = (void *) dbase;
ob.u.single = (fde *) eh_frame;
ob.s.i = 0;
ob.s.b.mixed_encoding = 1; /* Need to assume worst case. */
unsigned int encoding = get_fde_encoding (data->ret);
read_encoded_value_with_base (encoding,
- base_from_cb_data (encoding, data),
+ base_from_cb_data (encoding, dbase),
data->ret->pc_begin, &func);
data->func = (void *) func;
}
return ret;
data.pc = (_Unwind_Ptr) pc;
- data.tbase = NULL;
+#if NEED_DBASE_MEMBER
data.dbase = NULL;
+#endif
data.func = NULL;
data.ret = NULL;
data.check_cache = 1;
if (data.ret)
{
- bases->tbase = data.tbase;
+ bases->tbase = NULL;
+#if NEED_DBASE_MEMBER
bases->dbase = data.dbase;
+#else
+ bases->dbase = NULL;
+#endif
bases->func = data.func;
}
return data.ret;
# define _GLIBCXX11_DEPRECATED_SUGGEST(ALT)
#endif
-#if defined(__DEPRECATED) && (__cplusplus >= 201403L)
+#if defined(__DEPRECATED) && (__cplusplus >= 201402L)
# define _GLIBCXX14_DEPRECATED _GLIBCXX_DEPRECATED
# define _GLIBCXX14_DEPRECATED_SUGGEST(ALT) _GLIBCXX_DEPRECATED_SUGGEST(ALT)
#else
# define _GLIBCXX17_DEPRECATED_SUGGEST(ALT)
#endif
-#if defined(__DEPRECATED) && (__cplusplus > 201703L)
+#if defined(__DEPRECATED) && (__cplusplus >= 202002L)
# define _GLIBCXX20_DEPRECATED(MSG) [[deprecated(MSG)]]
# define _GLIBCXX20_DEPRECATED_SUGGEST(ALT) _GLIBCXX_DEPRECATED_SUGGEST(ALT)
#else