1. 17 May, 2020 1 commit
  2. 16 May, 2020 1 commit
  3. 15 May, 2020 2 commits
  4. 14 May, 2020 1 commit
  5. 13 May, 2020 5 commits
    • Fortran : ICE in gfc_conv_array_constructor_expr PR93497 · f2b77b92
      Invalid expressions, such as those involving array constructors,
      used for the length of character types will cause an ICE.
      
      2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      Backported from master
      2020-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      gcc/fortran/
      
      	PR fortran/93497
      	* decl.c (char_len_param_value): Check whether character
      	length expression is of type EXPR_OP and if so simplify it.
      	* resolve.c (resolve_charlen): Reject length if it has a
      	rank.
      
      2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      Backported from master
      2020-05-13  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      gcc/testsuite/
      
      	PR fortran/93497
      	* gfortran.dg/pr88025.f90: Change in wording of error.
      	* gfortran.dg/pr93497.f90: New test.
      	* gfortran.dg/pr93714_1.f90: Change in wording of errors.
      	* gfortran.dg/pr93714_2.f90: Change in wording of errors.
      Mark Eggleston committed
    • ipa/94947 - avoid using externally_visible_p () · a68d4b47
      externally_visible_p wasn't the correct predicate to use (even if it
      worked), instead we should use DECL_EXTERNAL || TREE_PUBLIC.
      
      2020-05-07  Richard Biener  <rguenther@suse.de>
      
      	PR ipa/94947
      	* tree-ssa-structalias.c (refered_from_nonlocal_fn): Use
      	DECL_EXTERNAL || TREE_PUBLIC instead of externally_visible.
      	(refered_from_nonlocal_var): Likewise.
      	(ipa_pta_execute): Likewise.
      Richard Biener committed
    • ipa/94947 - fix test for externally visible variables for IPA PTA · 67d00c43
      This fixes lack of an escape point of externally declared variables.
      
      2020-05-05  Richard Biener  <rguenther@suse.de>
      
      	PR ipa/94947
      	* tree-ssa-structalias.c (ipa_pta_execute): Use
      	varpool_node::externally_visible_p ().
      	(refered_from_nonlocal_var): Likewise.
      
      	* gcc.dg/torture/pr94947-1.c: New testcase.
      	* gcc.dg/torture/pr94947-2.c: Likewise.
      Richard Biener committed
    • testsuite/92177 - adjust expected patterns for gcc.dg/vect/bb-slp-22.c · ff9d4e09
      We now always vectorize two BBs, adjust the selector to also scan
      for integer multiplication vectorization explicitely.
      
      2020-05-05  Richard Biener  <rguenther@suse.de>
      
      	PR testsuite/92177
      	* gcc.dg/vect/bb-slp-22.c: Adjust.
      Richard Biener committed
    • Daily bump. · d7ff81e0
      GCC Administrator committed
  6. 12 May, 2020 6 commits
    • rs6000: AIX long double builtins for 64 bit long double. · 0d2cd7aa
      When long doubles are 64 bit, the AIX C library overrides the definitions
      but GCC builtins point to 128 bit names.  This patch overrides the
      builtins for fmodl, frexpl, ldexpl and modfl to refer to the 64 bit symbols.
      
      Backport from mainline
      2020-05-04  Clement Chigot  <clement.chigot@atos.net>
      	    David Edelsohn  <dje.gcc@gmail.com>
      
      	* config/rs6000/rs6000-call.c (rs6000_init_builtins): Override explicit
      	for fmodl, frexpl, ldexpl and modfl builtins.
      David Edelsohn committed
    • [Fortran] Fix/modify present() handling for assumed-shape optional (PR 94672) · 8aeffc4c
      gcc/fortran/
      2020-05-12  Tobias Burnus  <tobias@codesourcery.com>
      
      	Backported from mainline
      	2020-05-11  Tobias Burnus  <tobias@codesourcery.com>
      
      	PR fortran/94672
      	* trans.h (gfc_conv_expr_present): Add use_saved_decl=false argument.
      	* trans-expr.c (gfc_conv_expr_present): Likewise; use DECL directly
      	and only if use_saved_decl is true, use the actual PARAM_DECL arg (saved
      	descriptor).
      	* trans-array.c (gfc_trans_dummy_array_bias): Set local 'arg.0'
      	variable to NULL if 'arg' is not present.
      	* trans-openmp.c (gfc_omp_check_optional_argument): Simplify by checking
      	'arg.0' instead of the true PARM_DECL.
      	(gfc_omp_finish_clause): Remove setting 'arg.0' to NULL.
      
      gcc/testsuite/
      2020-05-12  Tobias Burnus  <tobias@codesourcery.com>
      
      	Backported from mainline
      	2020-05-11  Jakub Jelinek  <jakub@redhat.com>
      		    Tobias Burnus  <tobias@codesourcery.com>
      
      	PR fortran/94672
      	* gfortran.dg/gomp/pr94672.f90: New.
      	* gfortran.dg/missing_optional_dummy_6a.f90: Update scan-tree.
      Tobias Burnus committed
    • libstdc++: Fix incorrect size calculation in PMR resource (PR 94906) · dc103060
      Calculating the size of a chunk being returned to the upstream allocator
      was done with a 32-bit type, so it wrapped if the chunk was 4GB or
      larger.
      
      I don't know how to test this without allocating 4GB, so there's no test
      in the testsuite. It has been tested manually of course.
      
      Backport from mainline
      2020-05-04  Jonathan Wakely  <jwakely@redhat.com>
      
      	PR libstdc++/94906
      	* src/c++17/memory_resource.cc
      	(monotonic_buffer_resource::_Chunk::release): Use size_t for shift
      	operands.
      Jonathan Wakely committed
    • libstdc++: Make byte-sized std::fill_n a constant expression (PR 94933) · 8836c35d
      The overload for byte types uses memset and isn't constexpr. This adds
      the specifier and uses std::is_constant_evaluated() to provide a
      compile-time alternative.
      
      Backport from mainline
      2020-05-03  Jonathan Wakely  <jwakely@redhat.com>
      
      	PR libstdc++/94933
      	* include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
      	usable in constant expressions.
      	* testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
      	non-scalars.
      Jonathan Wakely committed
    • syscall: append to environment in tests, don't clobber it · fbfa806e
      This is a partial backport of https://golang.org/cl/233318.
      It's only a partial backport because part of the change was
      already applied to libgo in CL 193497 as part of the update
      to the Go 1.13beta1 release.
      
      Fixes PR go/95061
      
      Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233359
      Ian Lance Taylor committed
    • Daily bump. · 15a38f49
      GCC Administrator committed
  7. 11 May, 2020 5 commits
    • Update gcc .po files. · 5255b2da
      	* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
      	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
      	zh_TW.po: Update.
      Joseph Myers committed
    • Fortran : Spurious warning message with -Wsurprising PR59107 · 2653784e
      This change is from a patch developed for gcc-5.  The code
      has moved on since then requiring a change to interface.c
      
      2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      Backported from mainline
      2020-05-11  Janus Weil  <janus@gcc.gnu.org>
      	    Dominique d'Humieres  <dominiq@lps.ens.fr>
      
      gcc/fortran/
      
      	PR fortran/59107
      	* gfortran.h: Rename field resolved as resolve_symbol_called
      	and assign two 2 bits instead of 1.
      	* interface.c (check_dtio_interface1): Use new field name.
      	(gfc_find_typebound_dtio_proc): Use new field name.
      	* resolve.c (gfc_resolve_intrinsic): Replace check of the formal
      	field with resolve_symbol_called is at least 2, if it is not
      	set the field to 2.  (resolve_typebound_procedure): Use new field
      	name.  (resolve_symbol): Use new field name and check whether it
      	is at least 1, if it is not set the field to 1.
      
      Backported from mainline
      2020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>
      
      gcc/testsuite/
      
      	PR fortran/59107
      	* gfortran.dg/pr59107.f90: New test.
      Mark Eggleston committed
    • RTEMS: Improve GCC specification · 0eb6021c
      Add a start/end file specification if the -qrtems option is present.
      Allow targets to customize it.
      
      Support the standard -nodefaultlibs option.
      
      gcc/
      
      	* config/rtems.h (RTEMS_STARTFILE_SPEC): Define if undefined.
      	(RTEMS_ENDFILE_SPEC): Likewise.
      	(STARTFILE_SPEC): Update comment.  Add RTEMS_STARTFILE_SPEC.
      	(ENDFILE_SPEC): Add RTEMS_ENDFILE_SPEC.
      	(LIB_SPECS): Support -nodefaultlibs option.
      	* config/or1k/rtems.h (RTEMS_STARTFILE_SPEC): Define.
      	(RTEMS_ENDFILE_SPEC): Likewise.
      	* config/rs6000/rtems.h (RTEMS_STARTFILE_SPEC): Likewise.
      	(RTEMS_ENDFILE_SPEC): Likewise.
      	* config/v850/rtems.h (RTEMS_STARTFILE_SPEC): Likewise.
      	(RTEMS_ENDFILE_SPEC): Likewise.
      Sebastian Huber committed
    • Fix typo in fprofile-prefix-path. · 340c711b
      	Backport from mainline
      	2020-05-11  Martin Liska  <mliska@suse.cz>
      
      	PR c/95040
      	* common.opt: Fix typo in option description.
      Martin Liska committed
    • Daily bump. · 94c98e1f
      GCC Administrator committed
  8. 10 May, 2020 2 commits
    • coroutines: Update TREE_SIDE_EFFECTS on inserted bind exprs. · f09d8982
      There are several places where we insert bind expressions while
      making the coroutine AST transforms.  These should be marked as
      having side-effects where relevant, which had been omitted.  This
      leads to at least one failure in the cppcoros test suite, where a loop
      body is dropped in gimplification because it is not marked.
      
      gcc/cp/ChangeLog:
      
      2020-05-10  Iain Sandoe  <iain@sandoe.co.uk>
      
      	Backported from mainline
      	2020-05-08  Iain Sandoe  <iain@sandoe.co.uk>
      
      	PR c++/95003
      	* coroutines.cc (build_actor_fn): Ensure that bind scopes
      	are marked as having side-effects where necessary.
      	(replace_statement_captures): Likewise.
      	(morph_fn_to_coro): Likewise.
      
      gcc/testsuite/ChangeLog:
      
      2020-05-10  Iain Sandoe  <iain@sandoe.co.uk>
      
      	Backported from mainline
      	2020-05-08  Iain Sandoe  <iain@sandoe.co.uk>
      
      	PR c++/95003
      	* g++.dg/coroutines/torture/pr95003.C: New test.
      Iain Sandoe committed
    • Daily bump. · 6a054393
      GCC Administrator committed
  9. 09 May, 2020 1 commit
  10. 08 May, 2020 3 commits
    • c++: Parenthesized-init of aggregates accepts invalid code [PR94885] · ceae6a13
      Here we have (conceptually *) something like
      
        struct B { };
        struct D : B { };
        D(0); // invalid
      
      and in C++20 the ()-initialization has created a { 0 } constructor that
      it tries to initialize an object of type D with.  We should reject
      initializing an object of type B from 0, but we wrongly accept it because
      process_init_constructor_record skips initializers for empty bases/fields:
             if (DECL_SIZE (field) && integer_zerop (DECL_SIZE (field))
                 && !TREE_SIDE_EFFECTS (next))
               /* Don't add trivial initialization of an empty base/field to the
                  constructor, as they might not be ordered the way the back-end
                  expects.  */
               continue;
      but here 'next' was error_mark_node, returned by massage_elt_init, so we
      wound up with { } which would validly value-initialize the object.
      
      [*] Usually digest_init in build_new_method_call_1 would detect this,
      but in this case the instance is is_dummy_object and we don't call
      digest just yet.
      
              PR c++/94885
              * typeck2.c (process_init_constructor_record): Return PICFLAG_ERRONEOUS
              if an initializer element was erroneous.
      
              * g++.dg/cpp2a/paren-init26.C: New test.
      Marek Polacek committed
    • tree: Avoid variable sharing in get_narrower [PR94724] · 3a296f32
      On Thu, May 07, 2020 at 02:45:29PM +0200, Thomas Schwinge wrote:
      > >>+      for (tree op = win; TREE_CODE (op) == COMPOUND_EXPR;
      >
      > ..., and new 'op' variable here.
      >
      > >>+        op = TREE_OPERAND (op, 1))
      > >>+     v.safe_push (op);
      > >>+      FOR_EACH_VEC_ELT_REVERSE (v, i, op)
      > >>+     ret = build2_loc (EXPR_LOCATION (op), COMPOUND_EXPR,
      > >>+                       TREE_TYPE (win), TREE_OPERAND (op, 0),
      > >>+                       ret);
      > >>+      return ret;
      > >>     }
      > >>   while (TREE_CODE (op) == NOP_EXPR)
      > >>     {
      
      There is no reason for the shadowing and op at this point acts as a
      temporary and will be overwritten in FOR_EACH_VEC_ELT_REVERSE anyway.
      So, we can just s/tree // here.
      
      2020-05-08  Jakub Jelinek  <jakub@redhat.com>
      
      	PR middle-end/94724
      	* tree.c (get_narrower): Reuse the op temporary instead of
      	shadowing it.
      Jakub Jelinek committed
    • Daily bump. · 48f3d4eb
      GCC Administrator committed
  11. 07 May, 2020 13 commits
    • libstdc++: Replace deduced return type in ranges::iter_move (PR 92894) · 6fedf28c
      The deduced return type causes the instantiation of the function body,
      which can then require the instantiation of std::projected::operator*
      which is intentionally not defined.
      
      This patch uses a helper trait to define the return type, so that the
      function body doesn't need to be instantiated.
      
      Unlike on the master branch, this backport to gcc-10 does not change the
      iter_rvalue_reference_t alias template and __indirectly_readable_impl
      concept to use the new trait.
      
      Backport from mainline
      2020-05-01  Jonathan Wakely  <jwakely@redhat.com>
      	    Patrick Palka  <ppalka@redhat.com>
      
      	PR libstdc++/92894
      	* include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
      	Add trait to determine return type and an alias for it.
      	(ranges::__cust_imove::_IMove::operator()): Use __result instead of
      	deduced return type.
      	* testsuite/24_iterators/customization_points/92894.cc: New test.
      	* testsuite/24_iterators/indirect_callable/92894.cc: New test.
      
      Co-authored-by: Patrick Palka <ppalka@redhat.com>
      Jonathan Wakely committed
    • c++: ICE in value_dependent_expression_p in C++98 mode [PR94938] · e5613c55
      Here we ICE with -std=c++98 since the newly added call to uses_template_parms
      (r10-6357): we hit
      26530             gcc_assert (cxx_dialect >= cxx11
      26531                         || INTEGRAL_OR_ENUMERATION_TYPE_P (type));
      and TYPE is a record type.  The problem is that the argument to
      value_dependent_expression_p does not satisfy potential_constant_expression
      which it must, as the comment explains.  I thought about fixing this in
      uses_template_parms -- only call v_d_e_p if p_c_e is true, but in this
      case we want to also suppress the warnings if we don't have a constant
      expression.  I couldn't simply check TREE_CONSTANT as in
      compute_array_index_type_loc, because then we'd stop warning in the new
      Wtype-limits3.C test.
      
      Fixed by using type_dependent_expression_p_push instead.  This means
      that we won't suppress the warnings for value-dependent expressions that
      aren't type-dependent, e.g. sizeof (T).  This only seems to make a
      difference for -Wdiv-by-zero, now tested in Wdiv-by-zero-3.C, where I
      think it's reasonable to warn.  It could make -Wtautological-compare
      warn more, but that warning doesn't trigger when it gets constant arguments.
      Wtype-limits4.C is a test reduced from poly-int.h and it tests a scenario
      that was missing in our testsuite.
      
      This patch also moves the warning_sentinels after the RECURs -- we mean
      to use them for build_x_binary_op purposes only.
      
              PR c++/94938
              * pt.c (tsubst_copy_and_build): Call type_dependent_expression_p_push
              instead of uses_template_parms.  Move the warning_sentinels after the
              RECURs.
      
              * g++.dg/warn/Wdiv-by-zero-3.C: New test.
              * g++.dg/warn/Wtype-limits4.C: New test.
              * g++.dg/warn/template-2.C: New test.
              * g++.old-deja/g++.pt/crash10.C: Add dg-warning.
      Marek Polacek committed
    • alpha: Implement the PR94780 fix for alpha. · 9a993849
      Essentially the same fix as for x86.
      
      2020-05-07  Uroš Bizjak  <ubizjak@gmail.com>
      
      gcc/
      	* config/alpha/alpha.c (alpha_atomic_assign_expand_fenv): Use
      	TARGET_EXPR instead of MODIFY_EXPR for the first assignments to
      	fenv_var and new_fenv_var.
      Uros Bizjak committed
    • Fix optindex entries for 2 options. · 71e815a5
      	Backport from mainline
      	2020-05-07  Martin Liska  <mliska@suse.cz>
      
      	* doc/invoke.texi: Fix 2 optindex entries.
      Martin Liska committed
    • testsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946] · dd38686d
      The testcase in the current form doesn't FAIL without the patch on
      x86_64-linux unless also testing with -m32; as that the 64-bit testing
      on that target is probably way more common, and we can use also attributes
      that FAIL without the patch with -m64, the following patch adjusts the
      test, so that it FAILs without the patch for both -m64 and -m32 (but not
      -mx32) and PASSes with the patch.
      
      2020-05-07  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/94946
      	* g++.dg/ext/attr-parm-1.C: Enable the test also for lp64 x86, use
      	sysv_abi and ms_abi attributes in that case instead of fastcall and
      	no attribute.
      Jakub Jelinek committed
    • c-family: Fix error-recovery ICE on __builtin_speculation_safe_value [PR94968] · da91f9d2
      If the second argument of __builtin_speculation_safe_value is
      error_mark_node (or has such a type), we ICE during
      useless_typ_conversion_p.
      
      202-05-07  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c/94968
      	* c-common.c (speculation_safe_value_resolve_params): Return false if
      	error_operand_p (val2).
      	(resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
      	Remove extraneous semicolon.
      
      	* gcc.dg/pr94968.c: New test.
      Jakub Jelinek committed
    • c++: Avoid strict_aliasing_warning on dependent types or expressions [PR94951] · d82414eb
      The following testcase gets a bogus warning during build_base_path,
      when cp_build_indirect_ref* calls strict_aliasing_warning with a dependent
      expression.  IMHO calling get_alias_set etc. on dependent types feels wrong
      to me, we should just defer the warnings in those cases until instantiation
      and only handle the cases where neither type nor expr are dependent.
      
      2020-05-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/94951
      	* typeck.c (cp_strict_aliasing_warning): New function.
      	(cp_build_indirect_ref_1, build_reinterpret_cast_1): Use
      	it instead of strict_aliasing_warning.
      
      	* g++.dg/warn/Wstrict-aliasing-bogus-tmpl.C: New test.
      Jakub Jelinek committed
    • c++: Don't synthesize sfk_comparison method multiple times [PR94907] · 3d4c7e05
      On the following testcase we ICE, because synthesize_method is called twice
      on the same sfk_comparison method fndecl, the first time it works fine
      because start_preparsed_function in that case sets both
      current_function_decl and cfun, but second time it is called it only sets
      the former and keeps cfun NULL, so we ICE when trying to store
      current_function_returns_value.
      I think it is just wrong to call synthesize_method multiple times, and most
      synthesize_method callers avoid that by not calling it if DECL_INITIAL is
      already set, so this patch does that too.
      
      2020-05-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/94907
      	* method.c (defaulted_late_check): Don't call synthesize_method
      	on constexpr sfk_comparison if it has been called on it already.
      
      	* g++.dg/cpp2a/spaceship-synth8.C: New test.
      Jakub Jelinek committed
    • riscv: Fix up riscv_atomic_assign_expand_fenv [PR94950] · 5454a13a
      Similarly to the fixes on many other targets, riscv needs to use TARGET_EXPR
      to avoid having the create_tmp_var_raw temporaries without proper DECL_CONTEXT
      and not mentioned in local decls.
      
      2020-05-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR target/94950
      	* config/riscv/riscv-builtins.c (riscv_atomic_assign_expand_fenv): Use
      	TARGET_EXPR instead of MODIFY_EXPR for first assignment to old_flags.
      Jakub Jelinek committed
    • combine: Don't replace SET_SRC with REG_EQUAL note content if SET_SRC has side-effects [PR94873] · 8982e39b
      There were some discussions about whether REG_EQUAL notes are valid on insns with a single
      set which contains auto-inc-dec side-effects in the SET_SRC and the majority thinks that
      it should be valid.  So, this patch fixes the combiner to punt in that case, because otherwise
      the auto-inc-dec side-effects from the SET_SRC are lost.
      
      2020-05-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR rtl-optimization/94873
      	* combine.c (combine_instructions): Don't optimize using REG_EQUAL
      	note if SET_SRC (set) has side-effects.
      
      	* gcc.dg/pr94873.c: New test.
      Jakub Jelinek committed
    • x86: Fix *vec_dupv4hi constraints [PR94942] · 1b53c116
      This insn and split splits into HI->V?HImode broadcast for avx2 and later,
      but either the operands need to be %xmm0-%xmm15 (i.e. VEX encoded insn), or
      the insn needs both AVX512BW and AVX512VL.
      Now, Yv constraint is v for AVX512VL and x otherwise, so for -mavx512vl -mno-avx512bw
      we ICE if we end up with a %xmm16+ register from RA.
      Yw constraint is v for AVX512VL and AVX512BW and nothing otherwise, so
      in this pattern we actually need xYw.
      
      2020-05-05  Jakub Jelinek  <jakub@redhat.com>
      
      	PR target/94942
      	* config/i386/mmx.md (*vec_dupv4hi): Use xYw constraints instead of Yv.
      
      	* gcc.target/i386/pr94942.c: New test.
      Jakub Jelinek committed
    • diagnostics: get_option_html_page fixes · a764bbb7
      While testing the --with-documentation-root-url= changes, I run into
      [Wreturn-type] URL pointing to gfortran documentation where it obviously
      isn't documented.  The following patch updates the list of options to match
      reality (on the other side -Wconversion-extra is gfortran only option
      documented in gfortran.texi).
      
      Or, perhaps better use the attached patch instead, which doesn't have a
      hardcoded list and instead uses the flags?  I went through options.c
      and the updated list of options matches exactly the cases where CL_Fortran
      is set for "-W*" options together with CL_C and/or CL_CXX (ok, there is also
      -Wall and -Wextra, but hopefully we don't emit [Wall] or [Wextra] for
      anything).
      
      2020-05-04  Jakub Jelinek  <jakub@redhat.com>
      
      	* opts.c (get_option_html_page): Instead of hardcoding a list of
      	options common between C/C++ and Fortran only use gfortran/
      	documentation for warnings that have CL_Fortran set but not
      	CL_C or CL_CXX.
      Jakub Jelinek committed
    • c: Fix ICE with _Atomic side-effect in nested fn param decls [PR94842] · 61fb8963
      If there are _Atomic side-effects in the parameter declarations
      of non-nested function, when they are parsed, current_function_decl is
      NULL, the create_artificial_label created labels during build_atomic* are
      then adjusted by store_parm_decls through set_labels_context_r callback.
      Unfortunately, if such thing happens in nested function parameter
      declarations, while those decls are parsed current_function_decl is the
      parent function (and am not sure it is a good idea to temporarily clear it,
      some code perhaps should be aware it is in a nested function, or it can
      refer to variables from the parent function etc.) and that means
      store_param_decls through set_labels_context_r doesn't adjust anything.
      As those labels are emitted in the nested function body rather than in the
      parent, I think it is ok to override the context in those cases.
      
      2020-04-30  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c/94842
      	* c-decl.c (set_labels_context_r): In addition to context-less
      	LABEL_DECLs adjust also LABEL_DECLs with context equal to
      	parent function if any.
      	(store_parm_decls): Adjust comment.
      
      	* gcc.dg/pr94842.c: New test.
      Jakub Jelinek committed