Commit Graph

166121 Commits

Author SHA1 Message Date
H.J. Lu
87972ceb8f Use dg-additional-options instead of dg-options
Use dg-additional-options rather than dg-options to avoid overwriting the
default IEEE options which are passed by ieee.exp and necessary.

	PR testsuite/88639
	* gfortran.dg/ieee/ieee_10.f90: Use dg-additional-options
	instead of dg-options.

From-SVN: r267478
2018-12-30 09:36:05 -08:00
GCC Administrator
d5ae7d04ab Daily bump.
From-SVN: r267473
2018-12-30 00:16:15 +00:00
Gerald Pfeifer
4b420b27d3 Makefile.am (xcoff_%.c): Use an actual newline instead of \n in sed pattern.
* Makefile.am (xcoff_%.c): Use an actual newline instead of \n
	in sed pattern.
	* Makefile.in: Regenerate.

From-SVN: r267470
2018-12-29 23:22:50 +00:00
Dominique d'Humieres
0402d00e34 key2.C: Silence the [-Wreturn-type] warning.
2018-12-29  Dominique d'Humieres  <dominiq@gcc.gnu.org>

	* g++.dg/abi/key2.C: Silence the [-Wreturn-type] warning.

From-SVN: r267469
2018-12-29 23:30:14 +01:00
Steven G. Kargl
ede9dea5c4 expr.c (external_spec_function): Add ieee_support_subnormal to list of IEEE inquiry functions.
2018-12-29  Steven G. Kargl  <kargl@gcc.gnu.org>

	* expr.c (external_spec_function): Add ieee_support_subnormal to list
	of IEEE inquiry functions.

2018-12-29  Steven G. Kargl  <kargl@gcc.gnu.org>

	* gfortran.map: Expose subnormal functions in dynamic library.
	* ieee/ieee_arithmetic.F90: Add support for IEEE_SUBNORMAL,
	IEEE_POSITIVE_SUBNORMAL, and IEEE_NEGATIVE_SUBNORMAL.
	* ieee/ieee_helper.c: Ditto.
	* ieee/ieee_features.F90:  Add IEEE_SUBNORMAL.

2018-12-29  Steven G. Kargl  <kargl@gcc.gnu.org>

	* gfortran.dg/ieee/ieee_11.F90: New test.

From-SVN: r267468
2018-12-29 19:14:32 +00:00
Jozef Lawrynowicz
600845521e msp430.c (msp430_attr): Warn when the critical and interrupt function attributes are used together.
2018-12-29  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

	gcc/ChangeLog:

	* config/msp430/msp430.c (msp430_attr): Warn when the critical and
	interrupt function attributes are used together.
	* gcc/doc/extend.texi: Update documentation on the critical attribute.

	gcc/testsuite/ChangeLog:

	* gcc.target/msp430/critical-interrupt.c: New test.

From-SVN: r267467
2018-12-29 19:00:48 +00:00
Steven G. Kargl
74ee24e23e re PR fortran/88342 (Possible bug with IEEE_POSITIVE_INF and -ffpe-trap=overflow)
2018-12-29  Steven G. Kargl  <kargl@gcc.gnu.org>
      
	PR fortran/88342
	* ieee/ieee_arithmetic.F90: Prevent exceptions in IEEE_VALUE if
	-ffpe-trap=invalid or -ffpe-trap=overflow is used.

2018-12-29  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/88342
	* gfortran.dg/ieee/ieee_10.f90:  New test.

From-SVN: r267465
2018-12-29 18:10:57 +00:00
Steven G. Kargl
0b774babfb cpp.c (gfc_cpp_init): Add pre-defined macros for INTEGER(1) INTEGER(2)...
2018-12-25  Steven G. Kargl  <kargl@gcc.gnu.org>

	* cpp.c (gfc_cpp_init):  Add pre-defined macros for INTEGER(1)
	INTEGER(2), INTEGER(8) and INTEGER(16) if supported.  Add pre-defined
	macros for REAL(10) and REAL(16) if available.
	* gfortran.texi: Document new macros.

From-SVN: r267464
2018-12-29 17:43:02 +00:00
John David Anglin
40b1bb9f3b config.gcc (hppa*64*-*-linux*): Add pa/t-pa to tmake_file.
* config.gcc (hppa*64*-*-linux*): Add pa/t-pa to tmake_file.  Define
        d_target_objs.
	(hppa*-*-openbsd*): Likewise.
	(hppa[12]*-*-hpux10*): Likewise.
	(hppa*64*-*-hpux11*): Likewise.
	(hppa[12]*-*-hpux11*): Likewise.

From-SVN: r267463
2018-12-29 17:02:51 +00:00
Dominique d'Humieres
db304b55fb re PR tree-optimization/68356 (FAIL: gcc.dg/torture/pr68264.c -O* execution test on x86_64-apple-darwin1(0|4))
2018-12-29  Dominique d'Humieres  <dominiq@gcc.gnu.org>

	PR tree-optimization/68356
	PR target/81210
	PR target/81693
	* gcc.dg/torture/pr68264.c: Skip on darwin.
	* gcc.dg/torture/pr68037-1.c: Likewise.
	* gcc.dg/torture/pr68037-2.c: Likewise.
	* gcc.dg/torture/pr68037-3.c: Likewise.
	* gcc.dg/torture/pr25967-1.c: Likewise.
	* gcc.dg/torture/pr25967-2.c: Likewise.


M    ChangeLog
M    gcc.dg/torture/pr25967-1.c
M    gcc.dg/torture/pr25967-2.c
M    gcc.dg/torture/pr68037-1.c
M    gcc.dg/torture/pr68037-2.c
M    gcc.dg/torture/pr68037-3.c
M    gcc.dg/torture/pr68264.c

From-SVN: r267462
2018-12-29 16:05:55 +01:00
Jakub Jelinek
a4983b7ad8 re PR ipa/88586 (ICE: Segmentation fault (in free_lang_data_in_decl))
PR ipa/88586
	* omp-low.c (lower_omp_task_reductions): Set DECL_CONTEXT on field
	and ifield.  Update TYPE_ALIGN from alignment of field, ifield or
	bfield.

	* g++.dg/gomp/pr88586.C: New test.

From-SVN: r267461
2018-12-29 11:53:36 +01:00
GCC Administrator
2fda71537b Daily bump.
From-SVN: r267460
2018-12-29 00:16:30 +00:00
Ian Lance Taylor
e20bfbd18e runtime: prevent deadlock when profiling signal arrives in stack scan
Precise stack scan needs to unwind the stack. When it is
    unwinding the stack, if a profiling signal arrives, which also
    does a traceback, it may deadlock in dl_iterate_phdr. Prevent
    this deadlock by setting up runtime_in_callers before traceback.
    
    Reviewed-on: https://go-review.googlesource.com/c/155766

From-SVN: r267457
2018-12-29 00:07:06 +00:00
Uros Bizjak
50bec22834 i386.h (ADDITIONAL_REGISTER_NAMES): Add sil, dil, bpl and spl aliases.
* config/i386/i386.h (ADDITIONAL_REGISTER_NAMES): Add
	sil, dil, bpl and spl aliases.

From-SVN: r267456
2018-12-28 23:50:12 +01:00
Ian Lance Taylor
03f0fa9538 compiler: remove escapes_ field from Variable and Result_variable
The fields were set to true initially and never set to false.
    These were left over from an earlier attempt at escape analysis.
    
    Reviewed-on: https://go-review.googlesource.com/c/155750

From-SVN: r267455
2018-12-28 21:10:33 +00:00
Martin Sebor
3a03bffd48 tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Avoid undesirable warning.
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Avoid
	undesirable warning.

From-SVN: r267454
2018-12-28 12:26:14 -07:00
David Edelsohn
766d4a5925 ident-1b.c: XFAIL AIX and Darwin.
* c-c++-common/ident-1b.c: XFAIL AIX and Darwin.
        * c-c++-common/ident-2b.c: Likewise.

From-SVN: r267453
2018-12-28 14:14:51 -05:00
Steven G. Kargl
07b700ead5 re PR libfortran/81984 (NULL string pointer dereferencing forces undefined behaviour in libgfortran)
2018-12-28  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/81984
	* intrinsics/string_intrinsics_inc.c: Placate the sanitizer.

From-SVN: r267452
2018-12-28 18:26:09 +00:00
H.J. Lu
691adeb097 x86-64: Remove .file directive from snapshot source
* gcc.target/x86_64/abi/avx/asm-support-darwin.s: Remove .file
	directive.
	* gcc.target/x86_64/abi/avx/asm-support.S: Likewise.
	* gcc.target/x86_64/abi/avx512f/asm-support.S: Likewise.

From-SVN: r267451
2018-12-28 07:13:14 -08:00
H.J. Lu
ba7b6836f5 x86-64: Remove .file directive from snapshot source
Since snapshot() is implemented in assembly code, .file directive should
be removed.  Otherwise, debugger can't find the snapshot source.

	* gcc.target/x86_64/abi/asm-support-darwin.s: Remove .file
	directive.
	* gcc.target/x86_64/abi/asm-support.S: Likewise.

From-SVN: r267450
2018-12-28 06:40:27 -08:00
Thomas Schwinge
59d5960cdb For libgomp OpenACC entry points, redefine the "device" argument to "flags"
... so that we're then able to use this for other flags in addition to
"GOACC_FLAG_HOST_FALLBACK".

	gcc/
	* omp-expand.c (expand_omp_target): Restructure OpenACC vs. OpenMP
	code paths.  Update for libgomp OpenACC entry points change.
	include/
	* gomp-constants.h (GOACC_FLAG_HOST_FALLBACK)
	(GOACC_FLAGS_MARSHAL_OP, GOACC_FLAGS_UNMARSHAL): Define.
	libgomp/
	* oacc-parallel.c (GOACC_parallel_keyed, GOACC_parallel)
	(GOACC_data_start, GOACC_enter_exit_data, GOACC_update)
	(GOACC_declare): Redefine the "device" argument to "flags".

From-SVN: r267448
2018-12-28 12:34:14 +01:00
Thomas Schwinge
5a12987e79 poly_int: get_inner_reference & co.: fix known_eq typo/bug
gcc/
	* gimplify.c (gimplify_scan_omp_clauses): Fix known_eq typo/bug.

Co-Authored-By: Julian Brown <julian@codesourcery.com>

From-SVN: r267447
2018-12-28 12:34:03 +01:00
Thomas Schwinge
a44c17909a Cleanup libgomp's coalesce chunk data structures
libgomp/
	* target.c (struct gomp_coalesce_chunk): New structure.
	(struct gomp_coalesce_buf): Update the chunks member to use that
	type.  Adjust all users.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>

From-SVN: r267446
2018-12-28 12:33:54 +01:00
Tom de Vries
eb33bf0a0a [libbacktrace] Reduce memory usage in build_address_map
In build_address_map we allocate a unit, and then look for addresses in the
unit, which we store in the addrs vector, with the elements pointing to the
unit.  However, if we cannot find addresses in the unit, the allocated unit is
not used.

Fix this by detecting if the allocated unit has been used, and reusing it
otherwise.

Bootstrapped and reg-tested on x86_64.

2018-12-28  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (build_address_map): Reuse unused units.

From-SVN: r267445
2018-12-28 03:43:56 +00:00
Tom de Vries
d9aa0961ea [libbacktrace] Simplify memory management in build_address_map
In the main loop in build_address_map, we first read the abbrevs into a local
variable abbrevs, and then allocate the corresponding unit, after which we assign
the abbrevs to the unit.  This results in dedicated free-upon-failure
handling for the variable, and extra code to make sure that free-upon-failure
doesn't trigger once the unit has taken ownership of the abbrevs.

Simplify this by reversing the order of abbrev reading and unit allocation,
and eliminating the abbrevs local variable.

Bootstrapped and reg-tested on x86_64.

2018-12-28  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (build_address_map): Simplify by removing local variable
	abbrevs.

From-SVN: r267444
2018-12-28 03:43:41 +00:00
Ian Lance Taylor
40b8d3b253 [libbacktrace] Fix memory leak in loop in build_address_map
When failing in build_address_map, we free the unit that's currently being
handled in the loop, but the ones that already have been allocated are leaked.

Fix this by keeping track of allocated units in a vector, and releasing them
upon failure.

Also, now that we have a vector of allocated units, move the freeing upon
failure of the abbrevs associated with each unit to build_address_map, and
remove the now redundant call to free_unit_addrs_vector.

Bootstrapped and reg-tested on x86_64.

2018-12-28  Ian Lance Taylor  <iant@golang.org>
	    Tom de Vries  <tdevries@suse.de>

	PR libbacktrace/88063
	* dwarf.c (free_unit_addrs_vector): Remove.
	(build_address_map): Keep track of allocated units in vector.  Free
	allocated units and corresponding abbrevs upon failure.  Remove now
	redundant call to free_unit_addrs_vector.  Free addrs vector upon
	failure.  Free allocated unit vector.

Co-Authored-By: Tom de Vries <tdevries@suse.de>

From-SVN: r267443
2018-12-28 03:43:26 +00:00
Tom de Vries
53a52133a5 [libbacktrace] Fix memory leak in build_address_map
While upon failure in build_address_map we call free_unit_addrs_vector, this
does not actually free the addrs vector, but merely the abbrevs of the units
pointed at by the elements of the addrs vector.

Fix this by adding code to build_address_map to make sure that the addrs vector
is freed upon failure.

Bootstrapped and reg-tested on x86_64.

2018-12-28  Tom de Vries  <tdevries@suse.de>

	* dwarf.c (build_address_map): Free addrs vector upon failure.

From-SVN: r267442
2018-12-28 03:43:15 +00:00
GCC Administrator
f143030908 Daily bump.
From-SVN: r267441
2018-12-28 00:16:12 +00:00
Jan Hubicka
f7293b9dfa ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
* ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
	(polymorphic_call_target_hasher::hash): Hash it.
	(polymorphic_call_target_hasher::equal): Compare it.
	(possible_polymorphic_call_targets): Set it.
	* tree.c (free_lang_data): Rebuild type inheritance graph even on
	non-LTO path.

	* g++.dg/ipa/devirt-53.C: New testcase.

From-SVN: r267438
2018-12-27 21:23:30 +00:00
Steven G. Kargl
03b2d3defa re PR fortran/81027 (Assumed-shape array reported as deferred.)
2018-12-27  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/81027
	* expr.c (gfc_check_init_expr): Distinguish assumed-shape versus
	deferred-shape dummy arguments in an error message.

2018-12-27  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/81027
	* gfortran.dg/pr81027.f90: New test.
	* gfortran.dg/initialization_7.f90: Update error message.

From-SVN: r267437
2018-12-27 21:13:53 +00:00
Steven G. Kargl
b3c64ed0b0 aligned1.f03: Fix invalid code that now causes an error after r267415.
2018-12-27  Steven G. Kargl  <kargl@gcc.gnu.org>

	* libgomp.fortran/aligned1.f03: Fix invalid code that now causes
	an error after r267415.

From-SVN: r267436
2018-12-27 20:57:12 +00:00
Ian Lance Taylor
dc65168eb6 runtime: delete export_arm_test.go
The only thing export_arm_test.go does is to export usplit,
    which does not exist in gccgo.
    
    Reviewed-on: https://go-review.googlesource.com/c/155760

From-SVN: r267435
2018-12-27 16:34:50 +00:00
Ian Lance Taylor
f1410e7e2e runtime: let ARM32 EABI personality function continue unwind when called from traceback
On ARM32 EABI, unlike other platforms, the personality function is
    called during _Unwind_Backtrace (libgcc/unwind-arm-common.inc:581).
    In this case, simply unwind the frame without returning any
    handlers. Otherwise traceback will loop if there is a frame with
    a defer on stack.
    
    Reviewed-on: https://go-review.googlesource.com/c/155759

From-SVN: r267434
2018-12-27 16:31:50 +00:00
Martin Liska
96051ee57b Cherry pick libsanitizer patch (https://reviews.llvm.org/D54856).
2018-12-27  Martin Liska  <mliska@suse.cz>

  PR sanitizer/86229
	* asan/asan_errors.cc (ErrorAllocTypeMismatch::Print): Cherry
	pick rL350085.
	* asan/asan_errors.h (struct ErrorAllocTypeMismatch): Likewise.

From-SVN: r267432
2018-12-27 09:47:20 +00:00
Martin Liska
596883039a Fix slowness in gcov (PR gcov-profile/88225).
2018-12-27  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/88225
	* gcov.c(source_info::get_functions_at_location):
	Use newly added line_to_function_map.
	(source_info::add_function): New.
	(output_json_intermediate_file): Use a pointer return
	type for get_functions_at_location.
	(process_all_functions): Use add_function instead
	of direct push to a s->functions container.
	(release_structures): Release ident_to_fn.
	(read_graph_file): Register function into ident_to_fn.
	(read_count_file): Use the map.
	(output_lines): Handle pointer return type of
	get_functions_at_location.

From-SVN: r267431
2018-12-27 08:59:35 +00:00
Martin Liska
42bdb8f249 Comparison with an enum should mention enum value.
2018-12-27  Martin Liska  <mliska@suse.cz>

	* builtins.c (expand_movstr): Compare with RETURN_BEGIN.
	* expr.c (move_by_pieces): Likewise.
	(store_by_pieces): Likewise.
	(store_expr): Fix GNU coding style.

From-SVN: r267430
2018-12-27 08:51:14 +00:00
Martin Liska
44787584de Use proper location for tls_init function (PR c++/88263).
2018-12-27  Martin Liska  <mliska@suse.cz>

	PR c++/88263
	* decl2.c (get_local_tls_init_fn): Add location_t argument and
	use it.
	(get_tls_init_fn): Call it with location of variable for which
	we'll need to create tls_init function.
	(handle_tls_init): Likewise.
2018-12-27  Martin Liska  <mliska@suse.cz>

	PR c++/88263
	* g++.dg/gcov/pr88263.C: New test.

From-SVN: r267429
2018-12-27 08:46:13 +00:00
Ian Lance Taylor
75e479a8b5 runtime: on ARM32 EABI, don't get LSDA if compact model is used
On ARM32 EABI, when the "compact" unwinding model is used, it
    does not have standard LSDA and _Unwind_GetLanguageSpecificData
    will not return data that is parseable by us. Check this
    conditon before calling _Unwind_GetLanguageSpecificData.
    
    Fix ARM32 build.
    
    Reviewed-on: https://go-review.googlesource.com/c/155758

From-SVN: r267428
2018-12-27 03:13:11 +00:00
Andrew Pinski
257992db89 aarch64-cores.def (octeontx): New.
2018-12-26  Andrew Pinski  <apinski@marvell.com>

        * config/aarch64/aarch64-cores.def (octeontx): New.
        (octeontx81): Likewise.
        (octeontx83): Likewise.
        * config/aarch64/aarch64-tune.md: Regenerate.
        * doc/invoke.texi (AArch64 Options) [mtune]: Add octeontx, octeontx81
        and octeontx83.

From-SVN: r267427
2018-12-26 17:07:43 -08:00
GCC Administrator
fea0709e35 Daily bump.
From-SVN: r267426
2018-12-27 00:16:33 +00:00
Steven G. Kargl
c673c52c20 re PR fortran/85357 (ICE on invalid code with equal procedure names)
2018-12-26  Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/85357
        * gfortran.df/pr85357.f90: New test.

From-SVN: r267423
2018-12-26 21:08:53 +00:00
Harald Anlauf
2b8c2e7fb1 re PR fortran/85407 (Replace gcc_assert in module.c:read_module by more helpful diagnostics)
2018-12-26  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/85407
	* module.c (read_module): Convert assert to fatal error to give 
	user a sensible error message.

From-SVN: r267422
2018-12-26 20:37:28 +00:00
GCC Administrator
65accd28dd Daily bump.
From-SVN: r267421
2018-12-26 00:16:25 +00:00
GCC Administrator
da9f30142f Daily bump.
From-SVN: r267418
2018-12-25 00:16:35 +00:00
Steven G. Kargl
89c1cf2695 re PR fortran/45513 (BOZ kinds differently handled, F2008: BOZ in bit intrinsics)
2018-12-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/45513
	PR fortran/81509
	* check.c: Rename function gfc_check_iand to gfc_check_iand_ieor_ior.
	* check.c (boz_args_check): New function.  Check I and J not both BOZ.
	(gfc_check_dshift,gfc_check_iand_ieor_ior, gfc_check_ishft,
	 gfc_check_and, gfc_check_merge_bits): Use it.
	* check.c (gfc_check_iand_ieor_ior): Force conversion of BOZ to kind
	type of other agrument.  Remove silly GNU extension.
	(gfc_check_ieor, gfc_check_ior): Delete now unused functions.
	* intrinsic.c (add_functions): Use gfc_check_iand_ieor_ior. Wrap long
	line.
	* intrinsic.h: Rename gfc_check_iand to gfc_check_iand_ieor_ior.
	Delete prototype for bool gfc_check_ieor and gfc_check_ior
	* intrinsic.texi: Update documentation for boz-literal-constant.

2018-12-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/45513
	PR fortran/81509
	* gfortran.dg/graphite/id-26.f03: Fix non-conforming use of IAND.
	* gfortran.dg/pr81509_1.f90: New test.
	* gfortran.dg/pr81509_2.f90: New test.

From-SVN: r267415
2018-12-24 18:26:25 +00:00
Steven G. Kargl
a8ed2b4f64 ieee_9.f90: XFAIL on arm*-*-gnueabi[hf].
2018-12-24  Steven G. Kargl  <kargl@gcc.gnu.org>

	* gfortran.dg/ieee/ieee_9.f90:  XFAIL on arm*-*-gnueabi[hf].

From-SVN: r267414
2018-12-24 18:03:49 +00:00
Martin Sebor
fb471a1305 gimple-fold.c (get_range_strlen_tree): Factored out of get_range_strlen.
* gimple-fold.c (get_range_strlen_tree): Factored out of
	get_range_strlen.  Minor comment updates/additions.  Assert
	argument is not a simple SSA_NAME.
	(get_range_strlen): Call get_range_strlen_tree as appropriate.
	Minor comment updates/additions.

From-SVN: r267412
2018-12-24 08:32:11 -07:00
Jan Hubicka
c1dd347cbd ipa-devirt.c (dump_targets): Cap number of targets printed.
* ipa-devirt.c (dump_targets): Cap number of targets printed.
	(dump_possible_polymorphic_call_targets): Add verbose parameter.
	(ipa_devirt): Use it.
	* ipa-utils.h (dump_possible_polymorphic_call_targets): Add verbose
	parametrs.

From-SVN: r267400
2018-12-24 11:26:15 +00:00
Jan Hubicka
3d7bef8def Fix double-application of patch.
From-SVN: r267399
2018-12-24 11:23:57 +00:00
Jan Hubicka
77e9f49535 tree.c (fld_simplified_type): Temporarily disable array simplification.
* tree.c (fld_simplified_type): Temporarily disable array
	simplification.

	* gcc.c-torture/pr88140.c: New testcase.

From-SVN: r267398
2018-12-24 11:21:25 +00:00