aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2016-09-09re PR fortran/77506 (F2008 Standard does not allow CHARACTER(LEN=*) in array ↵Steven G. Kargl4-0/+24
constructor) 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77506 * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot appear in an array constructor. 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77506 * gfortran.dg/pr77506.f90: New test. From-SVN: r240052
2016-09-09cpp.texi (__*_WIDTH__): Small wording fixes.Bernd Edlinger2-2/+6
2016-09-09 Bernd Edlinger <bernd.edlinger@hotmail.de> * doc/cpp.texi (__*_WIDTH__): Small wording fixes. From-SVN: r240051
2016-09-09re PR fortran/77507 (gfortran rejects keyworded calls to procedures from ↵Steven G. Kargl4-3/+21
intrinsic modules) 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77507 * intrinsic.c (add_functions): Use correct keyword. 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77507 * ieee/ieee_arithmetic.F90 (IEEE_VALUE_4,IEEE_VALUE_8,IEEE_VALULE_10, IEEE_VALUE_16): Use correct keyword. 2016-09-09 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77507 * gfortran.dg/pr77507.f90: New test. From-SVN: r240050
2016-09-09compiler: break dependence on hex_valueIan Lance Taylor3-16/+65
Rework the lexical analyzer to eliminate the need to call hex_value() in libiberty (added equivalent local functionality). No change in functionality. Reviewed-on: https://go-review.googlesource.com/28855 From-SVN: r240049
2016-09-09Define TS 18661-1 type width macros in <limits.h> and <stdint.h>.Joseph Myers9-7/+482
TS 18661-1 defines <limits.h> and <stdint.h> macros for widths of standard integer types and the typedefs defined in, or whose limits are defined in, <stdint.h>. (The connection to the main floating-point subject matter of TS 18661-1 is that these are intended to be used with the fromfp functions to convert from floating point to integer types of any width in any rounding direction, though these macros may be of more general use.) This patch implements support for these macros in GCC's <limits.h> and <stdint.h>. To avoid needing to implement fixincludes for system headers where GCC wraps the system libc's <stdint.h> in hosted mode, the test for the <stdint.h> macros uses -ffreestanding (I'll add the macros to glibc's headers separately) - but as usual for new features in these headers, platforms (primarily OpenBSD) that use USER_H to avoid using GCC's headers at all will have failures until the system headers have the feature added or appropriate fixincludes are implemented. The header macros are implemented using appropriate new predefined macros, with the code avoiding defining more such macros than necessary (so one predefined macro suffices for corresponding signed and unsigned types, while no such predefined macros are needed for the exact-width types such as int8_t). Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc: * doc/cpp.texi (__SCHAR_WIDTH__, __SHRT_WIDTH__, __INT_WIDTH__) (__LONG_WIDTH__, __LONG_LONG_WIDTH__, __PTRDIFF_WIDTH__) (__SIG_ATOMIC_WIDTH__, __SIZE_WIDTH__, __WCHAR_WIDTH__) (__WINT_WIDTH__, __INT_LEAST8_WIDTH__, __INT_LEAST16_WIDTH__) (__INT_LEAST32_WIDTH__, __INT_LEAST64_WIDTH__) (__INT_FAST8_WIDTH__, __INT_FAST16_WIDTH__, __INT_FAST32_WIDTH__) (__INT_FAST64_WIDTH__, __INTPTR_WIDTH__, __INTMAX_WIDTH__): Document. * ginclude/stdint-gcc.h [__STDC_WANT_IEC_60559_BFP_EXT__]: Define width macros from TS 18661-1. * glimits.h [__STDC_WANT_IEC_60559_BFP_EXT__]: Likewise. gcc/c-family: * c-cppbuiltin.c (builtin_define_type_width): New function. (builtin_define_stdint_macros, c_cpp_builtins): Define type width macros. gcc/testsuite: * gcc.dg/limits-width-1.c, gcc.dg/stdint-width-1.c: New tests. From-SVN: r240048
2016-09-09runtime: use alignof to check alignment of ucontext_tIan Lance Taylor1-1/+1
Use alignof rather than assuming a 16 byte alignment. Reviewed-on: https://go-review.googlesource.com/28913 From-SVN: r240047
2016-09-09runtime: remove remaining use of MAKECONTEXT_STACK_TOP macroIan Lance Taylor1-1/+1
The definition and most uses of MAKECONTEXT_STACK_TOP were removed in https://golang.org/cl/88660043, which removed support for Solaris 8/9. One use of MAKECONTEXT_STACK_TOP was accidentally left in the source code. Remove it now. Reviewed-on: https://go-review.googlesource.com/28911 From-SVN: r240045
2016-09-09runtime: align ucontext_t argument to 16 byte boundaryIan Lance Taylor1-1/+1
Some systems, such as ia64 and PPC, require that a ucontext_t pointer passed to getcontext and friends be aligned to a 16-byte boundary. Currently the ucontext_t fields in the g structure are defined in Go, and Go has no way to ensure a 16-byte alignment for a struct field. The fields are currently represented by an array of unsafe.Pointer. Enforce the alignment by making the array larger, and picking an offset into the array that is 16-byte aligned. Reviewed-on: https://go-review.googlesource.com/28910 From-SVN: r240044
2016-09-09Daily bump.GCC Administrator1-1/+1
From-SVN: r240042
2016-09-08re PR fortran/69514 (ICE with nested array constructor)Steven G. Kargl5-2/+77
2016-09-08 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69514 * array.c (gfc_match_array_constructor): If type-spec is present, walk the array constructor performing possible conversions for numeric types. 2016-09-08 Steven G. Kargl <kargl@gcc.gnu.org> Louis Krupp <lkrupp@gcc.gnu.org> PR fortran/69514 * gfortran.dg/pr69514_1.f90: New test. * gfortran.dg/pr69514_2.f90: New test. Co-Authored-By: Louis Krupp <lkrupp@gcc.gnu.org> From-SVN: r240039
2016-09-08re PR fortran/77500 (ICE in gfc_trans_omp_atomic, at ↵Jakub Jelinek4-1/+28
fortran/trans-openmp.c:2822) PR fortran/77500 * trans-openmp.c (gfc_trans_omp_atomic): For atomic write or swap, don't try to look through GFC_ISYM_CONVERSION. In other cases, check that value.function.isym is non-NULL before dereferencing it. * gfortran.dg/gomp/pr77500.f90: New test. From-SVN: r240038
2016-09-08re PR fortran/77516 (ICE in is_gimple_min_invariant, at gimple-expr.c:706)Jakub Jelinek4-1/+26
PR fortran/77516 * omp-low.c (lower_rec_simd_input_clauses): Use max_vf for non-positive OMP_CLAUSE_SAFELEN_EXPR. * gfortran.dg/gomp/pr77516.f90: New test. From-SVN: r240037
2016-09-08Daily bump.GCC Administrator1-1/+1
From-SVN: r240036
2016-09-07PR middle-end/77475: Fix AArch64 testcases.Jakub Jelinek7-6/+16
2016-09-07 Jakub Jelinek <jakub@redhat.com> PR middle-end/77475 * gcc.target/aarch64/arch-diagnostics-1.c: Expect error on line 0. * gcc.target/aarch64/arch-diagnostics-2.c: Likewise. * gcc.target/aarch64/cpu-diagnostics-1.c: Likewise. * gcc.target/aarch64/cpu-diagnostics-2.c: Likewise. * gcc.target/aarch64/cpu-diagnostics-3.c: Likewise. * gcc.target/aarch64/cpu-diagnostics-4.c: Likewise. From-SVN: r240030
2016-09-07Move class substring_loc from c-family into gccDavid Malcolm15-196/+356
gcc/ChangeLog: * Makefile.in (OBJS): Add substring-locations.o. * langhooks-def.h (class substring_loc): New forward decl. (lhd_get_substring_location): New decl. (LANG_HOOKS_GET_SUBSTRING_LOCATION): New macro. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_GET_SUBSTRING_LOCATION. * langhooks.c (lhd_get_substring_location): New function. * langhooks.h (class substring_loc): New forward decl. (struct lang_hooks): Add field get_substring_location. * substring-locations.c: New file, taking definition of format_warning_va and format_warning_at_substring from c-family/c-format.c, making them non-static. * substring-locations.h (class substring_loc): Move class here from c-family/c-common.h. Add and rewrite comments. (format_warning_va): New decl. (format_warning_at_substring): New decl. (get_source_location_for_substring): Add comment. gcc/c-family/ChangeLog: * c-common.c (get_cpp_ttype_from_string_type): Handle being passed a POINTER_TYPE. (substring_loc::get_location): Move to substring-locations.c, keeping implementation as... (c_get_substring_location): New function, from the above, reworked to use accessors rather than member lookup. * c-common.h (class substring_loc): Move to substring-locations.h, replacing with a forward decl. (c_get_substring_location): New decl. * c-format.c: Include "substring-locations.h". (format_warning_va): Move to substring-locations.c. (format_warning_at_substring): Likewise. gcc/c/ChangeLog: * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use c_get_substring_location for this new langhook. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic_plugin_test_string_literals.c: Include "substring-locations.h". From-SVN: r240028
2016-09-07i386.c: Add 'U' suffix to processor feature bits to avoid -Wnarrowing warning.Eric Gallager4-35/+42
* config/i386/i386.c: Add 'U' suffix to processor feature bits to avoid -Wnarrowing warning. * config/i386/x86-tune.def: Likewise for DEF_TUNE selector bitmasks. * opts.c: Likewise for SANITIZER_OPT bitmasks. From-SVN: r240027
2016-09-07Improve aarch64_legitimize_address - avoid splitting the offset if it is ↵Wilco Dijkstra2-2/+17
supported. Improve aarch64_legitimize_address - avoid splitting the offset if it is supported. When we do split, take the mode size into account. BLKmode falls into the unaligned case but should be treated like LDP/STP. This improves codesize slightly due to fewer base address calculations: int f(int *p) { return p[5000] + p[7000]; } Now generates: f: add x0, x0, 16384 ldr w1, [x0, 3616] ldr w0, [x0, 11616] add w0, w1, w0 ret instead of: f: add x1, x0, 16384 add x0, x0, 24576 ldr w1, [x1, 3616] ldr w0, [x0, 3424] add w0, w1, w0 ret gcc/ * config/aarch64/aarch64.c (aarch64_legitimize_address): Avoid use of base_offset if offset already in range. From-SVN: r240026
2016-09-07re PR tree-optimization/77450 (ICE: in verify_ssa, at tree-ssa.c:1016 on ↵Richard Biener2-0/+7
very simple code with vectors) 2016-09-07 Richard Biener <rguenther@suse.de> PR c/77450 * c-c++-common/vector-subscript-8.c: Move .. * gcc.dg/pr77450.c: ... here. From-SVN: r240025
2016-09-07[SH] Move definitions for atomic models to sh.h from sh-protos.h.Kaz Kojima3-53/+69
From-SVN: r240023
2016-09-07Daily bump.GCC Administrator1-1/+1
From-SVN: r240022
2016-09-06Fix dates on changelogJerry DeLisle1-1/+1
From-SVN: r240019
2016-09-06re PR libfortran/77393 (Revision r237735 changed the behavior of F0.0)Jerry DeLisle3-4/+29
2016-09-06 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/77393 * io/write_float.def (build_float_string): Recognize when the result will not fit in the user provided, star fill, and exit early. * gfortran.dg/fmt_f0_2.f90: Update test. * gfortran.dg/fmt_f0_3.f90: New test. From-SVN: r240018
2016-09-07re PR debug/77389 (FAIL: g++.dg/debug/dwarf2/template-params-12f.C ↵Dominique d'Humieres3-2/+11
-std=gnu++11 scan-assembler-times DIE \\\\([^\\n]*\\\\) DW_TAG_template_value_param ...) 2016-09-07 Dominique d'Humieres <dominiq@lps.ens.fr> PR debug/77389 * g++.dg/debug/dwarf2/template-params-12g.C: Pass -gno-strict-dwarf in dg-options. PR debug/57519 * g++.dg/debug/dwarf2/imported-decl-2.C: Likewise. From-SVN: r240015
2016-09-06re PR target/69255 (ICE on x86_64-linux-gnu in "emit_move_insn")Jakub Jelinek6-2/+66
PR target/69255 * config/i386/i386.c (ix86_expand_builtin): For builtin with unsupported or unknown ISA, use expand_call. * gcc.target/i386/pr69255-1.c: New test. * gcc.target/i386/pr69255-2.c: New test. * gcc.target/i386/pr69255-3.c: New test. From-SVN: r240014
2016-09-06PR c/77336 - -Wsuggest-attribute=format warning overly simplisticMartin Sebor4-3/+61
gcc/c-family/ChangeLog: PR c/77336 * c-format.c (check_function_format): Avoid issuing warnings for functions unless they call format functions with non-constant format strings. gcc/testsuite/ChangeLog: PR c/77336 * gcc.dg/format/miss-7.c: New test. From-SVN: r240013
2016-09-06c_by_val_1.f: Correct the call to c_to_c and c_to_c8.Uros Bizjak2-4/+8
* gfortran.dg/c_by_val_1.f: Correct the call to c_to_c and c_to_c8. From-SVN: r240009
2016-09-06Detect whether target can use -fprofile-update=atomicMartin Liska4-0/+55
PR gcov-profile/77378 PR gcov-profile/77466 * libgcov-profiler.c: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{4,8} to conditionaly enable/disable *_atomic functions. PR gcov-profile/77378 PR gcov-profile/77466 * tree-profile.c (tree_profiling): Detect whether target can use -fprofile-update=atomic. PR gcov-profile/77378 PR gcov-profile/77466 * gcc.dg/profile-update-warning.c: New test. From-SVN: r240008
2016-09-06re PR tree-optimization/77479 (Compile time hog w/ -O2 (-Os))Richard Biener4-13/+55
2016-09-06 Richard Biener <rguenther@suse.de> PR tree-optimization/77479 * tree-vrp.c (update_value_range): Extend overflow handling to VARYING. * gcc.dg/torture/pr77479.c: New testcase. From-SVN: r240007
2016-09-06re PR tree-optimization/77450 (ICE: in verify_ssa, at tree-ssa.c:1016 on ↵Richard Biener5-3/+26
very simple code with vectors) 2016-09-06 Richard Biener <rguenther@suse.de> PR c/77450 c-family/ * c-common.c (c_common_mark_addressable_vec): Handle COMPOUND_LITERAL_EXPR. * c-c++-common/vector-subscript-7.c: Adjust. * c-c++-common/vector-subscript-8.c: New testcase. From-SVN: r240006
2016-09-06Skip Wno-frame-address test for avrSenthil Kumar Selvaraj2-1/+5
The avr backend supports __builtin_return_address only for the current stack frame. The test expects it to work for caller frames as well and therefore fails for avr. Add avr to the list of targets already excluded with dg-skip-if. gcc/testsuite/ChangeLog: 2016-09-06 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> * gcc.dg/Wno-frame-address.c: Skip for avr-*-*. From-SVN: r240005
2016-09-06Daily bump.GCC Administrator1-1/+1
From-SVN: r240004
2016-09-05re PR target/77476 ([AVX-512] illegal kmovb instruction on KNL)Jakub Jelinek6-4/+123
PR target/77476 * config/i386/i386.md (isa): Add x64_avx512bw. (*zero_extendsidi2): For alternative 11 use x64_avx512bw isa. (kmov_isa): New mode attr. (zero_extend<mode>di2): Use <kmov_isa> isa for the last alternative. (*zero_extend<mode>si2): Likewise. (*zero_extendqihi2): Use avx512dq isa for the last alternative. * gcc.target/i386/avx512f-pr77476.c: New test. * gcc.target/i386/avx512bw-pr77476.c: New test. * gcc.target/i386/avx512dq-pr77476.c: New test. From-SVN: r240000
2016-09-05target-supports.exp (check_effective_target_vect_simd_clones): Update ↵Jakub Jelinek2-4/+7
comment to mention also avx512f. * lib/target-supports.exp (check_effective_target_vect_simd_clones): Update comment to mention also avx512f. From-SVN: r239999
2016-09-05re PR sanitizer/77396 (address sanitizer crashes if all static global ↵Jakub Jelinek2-0/+17
variables are optimized) PR sanitizer/77396 * asan/asan_globals.cc: Cherry-pick upstream r280657. * g++.dg/asan/pr77396-2.C: New test. From-SVN: r239998
2016-09-05ChangeLog formatting fixes.Jakub Jelinek12-166/+166
From-SVN: r239997
2016-09-05invoke.texi (SPU Options): nops -> NOPs.Gerald Pfeifer2-5/+10
* doc/invoke.texi (SPU Options): nops -> NOPs. (x86 Options): Ditto. From-SVN: r239995
2016-09-05re PR middle-end/77475 (unnecessary or misleading context in reporting ↵Jakub Jelinek2-0/+9
command line problems) PR middle-end/77475 * toplev.c (process_options): Temporarily set input_location to UNKNOWN_LOCATION around targetm.target_option.override () call. From-SVN: r239994
2016-09-05* sv.po: Update.Joseph Myers2-172/+103
From-SVN: r239992
2016-09-05re PR target/77452 (ICE: in plus_constant, at explow.c:87 with ↵Uros Bizjak4-1/+33
-fno-split-wide-types -mavx512f --param=max-combine-insns=2) PR rtl-optimization/77452 * explow.c (plus_constant) <case MEM>: Extract scalar constant from inner-mode reference to a CONST_VECTOR constant in the constant pool. testsuite/ChangeLog: PR rtl-optimization/77452 * gcc.target/i386/pr77452.c: New test. From-SVN: r239989
2016-09-05re PR c/77423 (-Wlogical-not-parentheses false positive for bitwise ↵Marek Polacek6-5/+86
expression with _Bool operands) PR c/77423 * doc/invoke.texi: Update -Wlogical-not-parentheses documentation. * c-common.c (bool_promoted_to_int_p): New function. (expr_has_boolean_operands_p): New function. (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p. (maybe_warn_bool_compare): Use bool_promoted_to_int_p. * c-c++-common/Wlogical-not-parentheses-3.c: New test. From-SVN: r239988
2016-09-05re PR other/77421 (Bugs found in GCC with the help of PVS-Studio)Jakub Jelinek2-16/+18
PR other/77421 * gensupport.c (alter_output_for_subst_insn): Remove redundant *insn_out == '*' test. Don't copy unnecessary to yet another memory buffer, and don't leak it. From-SVN: r239987
2016-09-05re PR rtl-optimization/77425 (Pointer test follows dereference in sched-int.h)Jakub Jelinek2-2/+6
PR rtl-optimization/77425 * ipa-devirt.c (get_odr_type): Set val->id unconditionally. From-SVN: r239986
2016-09-05Daily bump.GCC Administrator1-1/+1
From-SVN: r239985
2016-09-04re PR fortran/77391 (gfortran allows CHARACTER(LEN=:),PARAMETER:: ↵Steven G. Kargl4-11/+45
STRING='constant' buts does not report it as an extension) 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77391 * resolve.c (deferred_requirements): New function to check F2008:C402. (resolve_fl_variable,resolve_fl_parameter): Use it. 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77391 * gfortran.dg/pr77391.f90: New test. From-SVN: r239982
2016-09-04re PR fortran/77460 (ICE when summing an overflowing array)Steven G. Kargl4-0/+20
2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77460 * simplify.c (simplify_transformation_to_scalar): On error, result may be NULL, simply return. 2016-09-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77460 * gfortran.dg/pr77460.f90: New test. From-SVN: r239979
2016-09-04re PR fortran/71902 (Unneeded temporary on reallocatable character assignment)Thomas Koenig3-2/+45
2016-09-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/71902 * frontend-passes.c (realloc_string_callback): Also check for the lhs being deferred. Name temporary variable "realloc_string". 2016-09-04 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/71902 * gfortran.dg/dependency_47.f90: New test. * gfortran.dg/dependency_49.f90: New test. From-SVN: r239977
2016-09-04Revert "Replace error_at with assert in build_va_arg"Tom de Vries2-2/+20
2016-09-04 Tom de Vries <tom@codesourcery.com> revert: 2016-08-29 Tom de Vries <tom@codesourcery.com> * c-common.c (build_va_arg): Replace first argument type error with assert. From-SVN: r239975
2016-09-04Daily bump.GCC Administrator1-1/+1
From-SVN: r239974
2016-09-03ubsan.c (ubsan_use_new_style_p): Fix check for empty string.Kirill Yukhin2-1/+5
gcc/ * ubsan.c (ubsan_use_new_style_p): Fix check for empty string. From-SVN: r239971
2016-09-03re PR c/65467 ([libgomp] sorry, unimplemented: '_Atomic' with OpenMP)Jakub Jelinek2-0/+6
PR c/65467 * gcc.dg/gomp/_Atomic-4.c: Require vect_simd_clones effective target. From-SVN: r239970