- 17 Jul, 2018 9 commits
-
-
2018-07-17 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * einfo.ads: Update documentation for Scalar_Range. From-SVN: r262772
Ed Schonberg committed -
In GNATprove mode we use frontend cross-references to synthesize the Global contract of subprograms with SPARK_Mode => Off and represent a read/write via a pointer as a read/write of a special entity called HEAP. This entity is now attached to the Standard package, so that we can safely check the Ekind of its Scope, which now happens in Scope_Within. This only affects GNATprove, so no frontend test provided. 2018-07-17 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * lib-xref-spark_specific.adb (Create_Heap): Attach the HEAP entity to the Standard package. From-SVN: r262771
Piotr Trojanek committed -
2018-07-17 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * einfo.adb (Is_Wrapper_Package): Remove extra parentheses. From-SVN: r262770
Piotr Trojanek committed -
2018-07-17 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_util.adb (Enclosing_Subprogram): Handle properly entries, and synchronized types that are completions of limited types or private extensions. (Scope_Within): Handle properly accept statements in task bodies. From-SVN: r262769
Ed Schonberg committed -
This patch updates the analysis of indicator Part_Of (or the lack thereof), to ignore generic formal parameters for purposes of determining the visible state space because they are not visible outside the generic and related instances. ------------ -- Source -- ------------ -- gen_pack.ads generic In_Formal : in Integer := 0; In_Out_Formal : in out Integer; package Gen_Pack is Exported_In_Formal : Integer renames In_Formal; Exported_In_Out_Formal : Integer renames In_Out_Formal; end Gen_Pack; -- pack.ads with Gen_Pack; package Pack with Abstract_State => State is procedure Force_Body; Val : Integer; private package OK_1 is new Gen_Pack (In_Out_Formal => Val) with Part_Of => State; -- OK package OK_2 is new Gen_Pack (In_Formal => 1, In_Out_Formal => Val) with Part_Of => State; -- OK package Error_1 is -- Error new Gen_Pack (In_Out_Formal => Val); package Error_2 is -- Error new Gen_Pack (In_Formal => 2, In_Out_Formal => Val); end Pack; -- pack.adb package body Pack with Refined_State => -- Error (State => (OK_1.Exported_In_Formal, OK_1.Exported_In_Out_Formal)) is procedure Force_Body is null; end Pack; -- gen_pack.ads generic In_Formal : in Integer := 0; In_Out_Formal : in out Integer; package Gen_Pack is Exported_In_Formal : Integer renames In_Formal; Exported_In_Out_Formal : Integer renames In_Out_Formal; end Gen_Pack; -- pack.ads with Gen_Pack; package Pack with Abstract_State => State is procedure Force_Body; Val : Integer; private package OK_1 is new Gen_Pack (In_Out_Formal => Val) with Part_Of => State; -- OK package OK_2 is new Gen_Pack (In_Formal => 1, In_Out_Formal => Val) with Part_Of => State; -- OK package Error_1 is -- Error new Gen_Pack (In_Out_Formal => Val); package Error_2 is -- Error new Gen_Pack (In_Formal => 2, In_Out_Formal => Val); end Pack; -- pack.adb package body Pack with Refined_State => -- Error (State => (OK_1.Exported_In_Formal, OK_1.Exported_In_Out_Formal)) is procedure Force_Body is null; end Pack; ---------------------------- -- Compilation and output -- ---------------------------- $ gcc -c pack.adb pack.adb:3:11: state "State" has unused Part_Of constituents pack.adb:3:11: constant "Exported_In_Formal" defined at gen_pack.ads:6, instance at pack.ads:15 pack.adb:3:11: variable "Exported_In_Out_Formal" defined at gen_pack.ads:7, instance at pack.ads:15 pack.ads:19:12: indicator Part_Of is required in this context (SPARK RM 7.2.6(2)) pack.ads:19:12: "Error_1" is declared in the private part of package "Pack" pack.ads:21:12: indicator Part_Of is required in this context (SPARK RM 7.2.6(2)) pack.ads:21:12: "Error_2" is declared in the private part of package "Pack" 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * sem_prag.adb (Has_Visible_State): Do not consider generic formals because they are not part of the visible state space. Add constants to the list of acceptable visible states. (Propagate_Part_Of): Do not consider generic formals when propagating the Part_Of indicator. * sem_util.adb (Entity_Of): Do not follow renaming chains which go through a generic formal because they are not visible for SPARK purposes. * sem_util.ads (Entity_Of): Update the comment on usage. From-SVN: r262768
Hristian Kirtchev committed -
2018-07-17 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_util.adb (Gather_Components): A discriminant of an ancestor may have been constrained by a later ancestor, so when looking for the value of that hidden discriminant we must examine the stored constraint of other ancestors than the immediate parent type. gcc/testsuite/ * gnat.dg/discr54.adb, gnat.dg/discr54_pkg.ads: New testcase. From-SVN: r262767
Ed Schonberg committed -
This patch modifies the recursive tree replication routine New_Copy_Tree to create new entities and remap old entities to the new ones for constructs in N_Expression_With_Actions nodes when requested by a caller. This in turn allows the build-in-place mechanism to avoid sharing entities between the 4 variants of returns it generates. 2018-07-17 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * exp_ch6.adb (Build_Heap_Or_Pool_Allocator): Ensure that scoping constructs and entities within receive new entities when replicating a tree. (Expand_N_Extended_Return_Statement): Ensure that scoping constructs and entities within receive new entities when replicating a tree. * sem_util.adb (New_Copy_Tree): Add new formal Scopes_In_EWA_OK. (Visit_Entity): Visit entities within scoping constructs inside expression with actions nodes when requested by the caller. Add blocks, labels, and procedures to the list of entities which need replication. * sem_util.ads (New_Copy_Tree): Add new formal Scopes_In_EWA_OK. Update the comment on usage. gcc/testsuite/ * gnat.dg/bip_case_expr.adb, gnat.dg/bip_case_expr_pkg.ads: New testcase. From-SVN: r262766
Hristian Kirtchev committed -
2018-07-17 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * doc/gnat_ugn/about_this_guide.rst, doc/gnat_ugn/gnat_and_program_execution.rst: Remove references to gcov. * gnat_ugn.texi: Regenerate. From-SVN: r262765
Arnaud Charlet committed -
From-SVN: r262764
GCC Administrator committed
-
- 16 Jul, 2018 31 commits
-
-
gcc/testsuite/ChangeLog: 2018-07-16 Carl Love <cel@us.ibm.com> Forgot the PR number on the commit log. PR target/86414 2018-07-16 Carl Love <cel@us.ibm.com> PR target/86414 * gcc.target/powerpc/divkc3-2.c: Add dg-require-effective-target longdouble128. * gcc.target/powerpc/divkc3-3.c: Ditto. * gcc.target/powerpc/mulkc3-2.c: Ditto. * gcc.target/powerpc/mulkc3-3.c: Ditto. * gcc.target/powerpc/fold-vec-mergehl-double.c: Update counts. * gcc.target/powerpc/pr85456.c: Make check Linux and AIX specific. From-SVN: r262758
Carl Love committed -
This tests the generated code for all conversions between floating point point types, binary and decimal. gcc/testsuite/ * gcc.target/powerpc/convert-fp-128.c: New testcase. * gcc.target/powerpc/convert-fp-64.c: New testcase. From-SVN: r262757
Segher Boessenkool committed -
This introduces four new selectors for use with Power testcases: longdouble64, ppc_float128, ppc_float128_insns, powerpc_vsx. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_longdouble64, check_effective_target_ppc_float128, check_effective_target_ppc_float128_insns, check_effective_target_powerpc_vsx): New. From-SVN: r262756
Segher Boessenkool committed -
The test program for ppc_float128_hw_available would always return false, since there is a syntax error in that test program. gcc/testsuite/ * lib/target-supports.exp (check_ppc_float128_hw_available): Fix syntax error. From-SVN: r262755
Segher Boessenkool committed -
The current implementation leaves an unnecessary register move. It is easier to just expand things in the expander already. This patch does that. * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of double-double modes to SFmode directly directly. (trunc<mode>sf2_fprs): Delete. From-SVN: r262754
Segher Boessenkool committed -
The libcalls for trunc and extend of a decimal float to a binary float, and vice versa, do not have "2" in the name, although all other such conversions do. * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names for conversions between IFmode and the decimal floating point modes. (init_float128_ieee): Use the correct names for conversions between KFmode and the decimal floating point modes. From-SVN: r262753
Segher Boessenkool committed -
They had source and destination swapped in the name. * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names for the conversions between TDmode and IFmode. (init_float128_ieee): Use more correct names for the conversions between TDmode and KFmode. From-SVN: r262752
Segher Boessenkool committed -
PR tree-optimization/86526 * builtins.c (expand_builtin_memcmp): Formatting fixes. (inline_expand_builtin_string_cmp): Likewise. (inline_string_cmp): Likewise. Use c_readstr instead of builtin_memcpy_read_str. Add unit_mode temporary. * gcc.c-torture/compile/pr86526.c: New test. From-SVN: r262750
Jakub Jelinek committed -
gcc/testsuite/ChangeLog: 2018-07-16 Carl Love <cel@us.ibm.com> * gcc.target/powerpc/divkc3-2.c: Add dg-require-effective-target longdouble128. * gcc.target/powerpc/divkc3-3.c: Ditto. * gcc.target/powerpc/mulkc3-2.c: Ditto. * gcc.target/powerpc/mulkc3-3.c: Ditto. * gcc.target/powerpc/fold-vec-mergehl-double.c: Update counts. * gcc.target/powerpc/pr85456.c: Make check Linux and AIX specific. From-SVN: r262749
Carl Love committed -
2018-07-16 Fritz Reese <fritzoreese@gmail.com> Fix handling of invalid assumed-shape/size arrays in legacy initializer lists. gcc/fortran/ChangeLog: PR fortran/83184 * decl.c (match_old_style_init): Initialize locus of variable expr when creating a data variable. (match_clist_expr): Verify array is explicit shape/size before attempting to allocate constant array constructor. gcc/testsuite/ChangeLog: PR fortran/83184 * gfortran.dg/assumed_rank_14.f90: New testcase. * gfortran.dg/assumed_rank_15.f90: New testcase. * gfortran.dg/dec_structure_8.f90: Update error messages. * gfortran.dg/dec_structure_23.f90: Update error messages. From-SVN: r262744
Fritz Reese committed -
2018-07-16 Fritz Reese <fritzoreese@gmail.com> gcc/fortran/ChangeLog: PR fortran/86417 * module.c (mio_component): Set component->loc when loading from module. From-SVN: r262743
Fritz Reese committed -
re PR middle-end/86528 (strlen of constant string malfunction -- had to back out fix for PR middle-end/77357) gcc: 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de> PR middle-end/86528 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST. * expr.c (string_constant): Fix the element size of ARRAY_TYPE. testsuite: 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de> PR middle-end/86528 * gcc.c-torture/execute/pr86528.c: New test. * gcc.dg/Wrestrict-10.c (test_arr_strcat_2): Fix typo. From-SVN: r262742
Bernd Edlinger committed -
From-SVN: r262741
Jonathan Wakely committed -
class.c (resolve_address_of_overloaded_function): Don't emit an inform if the matching permerror returns false. /cp 2018-07-16 Paolo Carlini <paolo.carlini@oracle.com> * class.c (resolve_address_of_overloaded_function): Don't emit an inform if the matching permerror returns false. * pt.c (check_specialization_namespace): Likewise. /testsuite 2018-07-16 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/template/spec40.C: New. * g++.dg/parse/ptrmem8.C: Likewise. From-SVN: r262740
Paolo Carlini committed -
The standard doesn't specify this partial specialization (it was required after the changes in N2637 but then should have been removed following LWG 1262). Its presence is observable because it causes different results when operator< has been overloaded for a shared_ptr specialization. PR libstdc++/86537 * include/bits/shared_ptr.h (less<shared_ptr<_Tp>>): Remove non-standard partial specialization. * include/bits/shared_ptr_base.h (_Sp_less): Remove class definition. (less<__shared_ptr<_Tp, _Lp>): Remove partial specialization. * testsuite/20_util/shared_ptr/comparison/86537.cc: New test. From-SVN: r262739
Jonathan Wakely committed -
gcc/ChangeLog: 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org> * doc/extend.texi (PowerPC AltiVec Built-in Functions): Alphabetize prototypes of built-in functions, separating out built-in functions that are listed in this section but should be described elsewhere. From-SVN: r262737
Kelvin Nilsen committed -
PR target/86511 * expmed.c (emit_store_flag): Do not emit setcc followed by a conditional move when trapping comparison was split to a non-trapping one (and vice versa). From-SVN: r262736
Uros Bizjak committed -
From-SVN: r262735
Andreas Krebbel committed -
On i386 the profiler call sequence always consists of 1 call instruction, so -mnop-mcount generates a single nop with the same length as a call. For S/390 longer sequences may be used in some cases, so -mnop-mcount generates the corresponding amount of nops. 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com> * config/s390/s390.c (s390_function_profiler): Generate nops instead of profiler call sequences. * config/s390/s390.opt: Add the new option. 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com> * gcc.target/s390/mnop-mcount-m31-fpic.c: New testcase. * gcc.target/s390/mnop-mcount-m31-mzarch.c: New testcase. * gcc.target/s390/mnop-mcount-m31.c: New testcase. * gcc.target/s390/mnop-mcount-m64-mfentry.c: New testcase. * gcc.target/s390/mnop-mcount-m64.c: New testcase. From-SVN: r262734
Ilya Leoshkevich committed -
This is the counterpart of the i386 feature introduced by 39a5a6a4: Add direct support for Linux kernel __fentry__ patching. 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com> * config/s390/s390.c (s390_function_profiler): Generate __mcount_loc section. * config/s390/s390.opt: Add the new option. 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com> * testsuite/gcc.target/s390/mrecord-mcount.c: New testcase. From-SVN: r262733
Ilya Leoshkevich committed -
On i386, the difference between mcount and fentry is that fentry comes before the prolog. On s390 mcount already comes before the prolog, but takes 4 instructions. This patch introduces the more efficient implementation (just 1 instruction) and puts it under -mfentry flag. The produced code is compatible only with newer glibc versions, which provide the __fentry__ symbol and do not clobber %r0 when resolving lazily bound functions. Because 31-bit PLT stubs assume %r12 contains GOT address, which is not the case when the code runs before the prolog, -mfentry is allowed only for 64-bit code. Also, code compiled with -mfentry cannot be used for the nested C functions, since they both use %r0. In this case instrumentation is not insterted, and a new warning is issued for each affected nested function. 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com> * common.opt: Add the new warning. * config/s390/s390.c (s390_function_profiler): Emit "brasl %r0,__fentry__" when -mfentry is specified. (s390_option_override_internal): Disallow -mfentry for 31-bit CPUs. * config/s390/s390.opt: Add the new option. 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com> * gcc.target/s390/mfentry-m64.c: New testcase. From-SVN: r262732
Ilya Leoshkevich committed -
This patch modifies the analysis of package contracts to split processing which is specific to package instantiations on its own. As a result, the lack of indicator Part_Of can now be properly assessed. ------------ -- Source -- ------------ -- gen_pack.ads generic package Gen_Pack is Pack_Var : Integer := 1; end Gen_Pack; -- gen_wrap.ads with Gen_Pack; generic package Gen_Wrap is Wrap_Var : Integer := 1; package Inst is new Gen_Pack; end Gen_Wrap; -- pack.ads with Gen_Pack; with Gen_Wrap; package Pack with SPARK_Mode => On, Abstract_State => State is procedure Force_Body; private package OK_Inst_1 is new Gen_Pack -- OK with Part_Of => State; -- OK package OK_Inst_2 is new Gen_Pack; -- OK pragma Part_Of (State); -- OK package OK_Inst_3 is new Gen_Wrap -- OK with Part_Of => State; -- OK package OK_Inst_4 is new Gen_Wrap; -- OK pragma Part_Of (State); package Error_Inst_1 is new Gen_Pack; -- Error package Error_Inst_2 is new Gen_Wrap; -- Error end Pack; -- pack.adb package body Pack with SPARK_Mode => On, Refined_State => (State => (OK_Inst_1.Pack_Var, OK_Inst_2.Pack_Var, OK_Inst_3.Wrap_Var, OK_Inst_3.Inst.Pack_Var, OK_Inst_4.Wrap_Var, OK_Inst_4.Inst.Pack_Var)) is procedure Force_Body is null; end Pack; ---------------------------- -- Compilation and output -- ---------------------------- $ gcc -c pack.adb pack.ads:23:12: indicator Part_Of is required in this context (SPARK RM 7.2.6(2)) pack.ads:23:12: "Error_Inst_1" is declared in the private part of package "Pack" pack.ads:24:12: indicator Part_Of is required in this context (SPARK RM 7.2.6(2)) pack.ads:24:12: "Error_Inst_2" is declared in the private part of package "Pack" 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * contracts.adb (Analyze_Contracts): Add specialized processing for package instantiation contracts. (Analyze_Package_Contract): Remove the verification of a missing Part_Of indicator. (Analyze_Package_Instantiation_Contract): New routine. * contracts.ads (Analyze_Package_Contract): Update the comment on usage. * sem_prag.adb (Check_Missing_Part_Of): Ensure that the entity of the instance is being examined when trying to determine whether a package instantiation needs a Part_Of indicator. From-SVN: r262731
Hristian Kirtchev committed -
2018-07-16 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * einfo.adb, exp_ch7.adb, exp_ch9.adb, exp_unst.adb, inline.adb, sem.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_eval.adb, sem_util.adb: Minor reformatting. From-SVN: r262730
Hristian Kirtchev committed -
2018-07-16 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * frontend.adb: Only unnest subprograms if no previous errors were detected. From-SVN: r262729
Arnaud Charlet committed -
2018-07-16 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle loops that contain blocks in the elaboration code for a package body. Create the elaboration subprogram wrapper only if there is a subprogram declaration in a block or loop. From-SVN: r262728
Ed Schonberg committed -
2018-07-16 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * exp_ch4.adb (Expand_Set_Membership): Use New_Copy_Tree to perform a deep copy of the left operand when building each conjuct of the expanded membership operation, to avoid sharing nodes between them. This sharing interferes with the unnesting machinery and is generally undesirable. From-SVN: r262727
Ed Schonberg committed -
2018-07-16 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * exp_unst.adb (Visit_Node): Handle 'Address references that are calls. From-SVN: r262726
Ed Schonberg committed -
2018-07-16 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * exp_unst.adb (Visit_Node): Handle the semantic of Storage_Pool field in relevant nodes: Allocate, Free, and return statements. From-SVN: r262725
Ed Schonberg committed -
2018-07-16 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch12.adb (Analyze_Package_Instantiation): Handle properly an instance that carries an aspect Default_Storage_Pool that overrides a default storage pool that applies to the generic unit. The aspect in the generic unit was removed before copying it in the instance, rather than removing it from the copy of the aspects that are appended to the aspects in the instance. From-SVN: r262724
Ed Schonberg committed -
2018-07-16 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * einfo.adb (Set_Is_Uplevel_Referenced_Entity): Flag can appear on loop parameters. * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle subprogram bodies. * exp_ch9.adb (Reset_Scopes_To): Set the scopes of entities local to an entry body to be the corresponding generated subprogram, for correct analysis of uplevel references. * exp_unst.adb (Visit_Node): Handle properly binary and unary operators Ignore pragmas, fix component associations. (Register_Subprograms): Subprograms in synchronized types must be treated as reachable. From-SVN: r262723
Ed Schonberg committed -
This patch corrects the mechanism which ensures that a package with a null Abstract_State does not introduce hidden state, by ignoring internal states and variables because they do not represent the "source" hidden state. 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * sem_util.adb (Check_No_Hidden_State): Ignore internally-generated states and variables. gcc/testsuite/ * gnat.dg/abstract_state1.adb, gnat.dg/abstract_state1.ads: New testcase. From-SVN: r262722
Hristian Kirtchev committed
-