diff options
author | Martin Liska <mliska@suse.cz> | 2021-11-22 17:39:30 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-11-22 17:39:30 +0100 |
commit | 44a06feaf84111c298bb906b4906b54073fc61d5 (patch) | |
tree | 93211de0a07d41e0e046e7b37db2e99578a661a9 | |
parent | ffa33d36af92357098870be1e7dbedad0f883a37 (diff) | |
parent | c38c547a708d9f144ba36f54d3d6ab5f5995966f (diff) | |
download | gcc-44a06feaf84111c298bb906b4906b54073fc61d5.zip gcc-44a06feaf84111c298bb906b4906b54073fc61d5.tar.gz gcc-44a06feaf84111c298bb906b4906b54073fc61d5.tar.bz2 |
Merge branch 'master' into devel/sphinx
-rw-r--r-- | gcc/cp/parser.c | 26 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 12 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/goacc/routine-6.c | 4 | ||||
-rw-r--r-- | libgcc/unwind-dw2-fde-dip.c | 54 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/c++config | 4 |
5 files changed, 59 insertions, 41 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index aa7f0e4..e2b5d68 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -46852,8 +46852,8 @@ cp_parser_late_parsing_oacc_routine (cp_parser *parser, tree attrs) 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; } @@ -46871,16 +46871,17 @@ cp_finalize_oacc_routine (cp_parser *parser, tree fndecl, bool is_defn) || 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; } @@ -46921,11 +46922,6 @@ cp_finalize_oacc_routine (cp_parser *parser, tree fndecl, bool is_defn) 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; } } diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 714a415..34484f6 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -14672,10 +14672,6 @@ by the RTL if-conversion pass for a branch that is considered unpredictable. 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) @@ -14725,10 +14721,6 @@ A threshold on the average loop count considered by the swing modulo scheduler. 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}. @@ -14778,10 +14770,6 @@ when comparing to the number of (scaled) blocks. 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. diff --git a/gcc/testsuite/c-c++-common/goacc/routine-6.c b/gcc/testsuite/c-c++-common/goacc/routine-6.c new file mode 100644 index 0000000..0a231a0 --- /dev/null +++ b/gcc/testsuite/c-c++-common/goacc/routine-6.c @@ -0,0 +1,4 @@ +/* PR c++/101731 */ + +#pragma acc routine /* { dg-error "not immediately followed by a single function declaration or definition" "" { target c++ } } */ +int foo (int bar ()); diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c index 5095b68..3f30282 100644 --- a/libgcc/unwind-dw2-fde-dip.c +++ b/libgcc/unwind-dw2-fde-dip.c @@ -101,16 +101,35 @@ static const fde * _Unwind_Find_registered_FDE (void *pc, struct dwarf_eh_bases #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; @@ -140,9 +159,11 @@ static struct frame_hdr_cache_element *frame_hdr_cache_head; /* 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; @@ -154,12 +175,15 @@ base_from_cb_data (unsigned char encoding, struct unw_eh_callback_data *data) 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 @@ -359,9 +383,10 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr) # 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); @@ -375,7 +400,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr) 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) @@ -431,8 +456,8 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr) 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. */ @@ -443,7 +468,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr) 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; } @@ -461,8 +486,9 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases) 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; @@ -472,8 +498,12 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases) 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; diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 4b7fa65..cbcdedb 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -107,7 +107,7 @@ # 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 @@ -123,7 +123,7 @@ # 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 |