[Bug target/71629] [7 Regression] ICE in lra_set_insn_recog_data, at lra.c:964 w/ -O2 -mlra

2016-10-16 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71629

--- Comment #8 from Arseny Solokha  ---
Well, snippets from #c0 and #c2 still make the latest snapshot ICE:

%
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20161016/work/build/./gcc/xgcc
-B/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20161016/work/build/./gcc/
-fPIC -fstack-protector -O2 -c -w /tmp/1.c
/tmp/1.c: In function 'pf':
/tmp/1.c:41:1: internal compiler error: in lra_set_insn_recog_data, at
lra.c:965
 }
 ^

%
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20161016/work/build/./gcc/xgcc
-B/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20161016/work/build/./gcc/
-fPIC -fstack-protector -Os -c -w /tmp/2.c
/tmp/2.c: In function 'kw':
/tmp/2.c:37:1: internal compiler error: in lra_set_insn_recog_data, at
lra.c:965
 }
 ^

And I still can't bootstrap the latest snapshot itself:

%
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20161016/work/build/./gcc/xgcc
-B/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20161016/work/build/./gcc/
-g -O2 -c -w method-gl.ii 
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20161016/work/gcc-7-20161016/libitm/method-gl.cc:
In member function  virtual void
{anonymous}::gl_wt_dispatch::ITM_WaRU8(_ITM_TYPE_U8*, _ITM_TYPE_U8)':
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20161016/work/gcc-7-20161016/libitm/method-gl.cc:376:88:
internal compiler error: in lra_set_insn_recog_data, at lra.c:965

(but notice the difference in flags needed for reproducing it). So, do you mean
I should open a new PR for the latter bootstrap-related case?

[Bug c++/64270] packed fields

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64270

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Andrew Pinski  ---
Actually this is invalid and here is the reason why:
a packed reference is not going to bind to a reference by design.  It is a copy
of the array at this point.  If you change from an array to a scalar it will
also do the same behavior.

[Bug tree-optimization/63644] Kahan Summation with fast-math, pattern not always recognized

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63644

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization

--- Comment #1 from Andrew Pinski  ---
It is kinda of vectorized:

  :
  # vect_vec_iv_.37_29 = PHI 
  # ivtmp.43_16 = PHI 
  vect_vec_iv_.37_30 = vect_vec_iv_.37_29 + { 4.00059604644775390625e-1,
4.00059604644775390625e-1, 4.00059604644775390625e-1,
4.00059604644775390625e-1 };
  vect_s_10.38_32 = vect_vec_iv_.37_29 + { 1.0001490116119384765625e-1,
1.0001490116119384765625e-1, 1.0001490116119384765625e-1,
1.0001490116119384765625e-1 };
  ivtmp.43_13 = ivtmp.43_16 + 1;
  if (ivtmp.43_13 >= bnd.33_20)
goto ;
  else
goto ;

But then the vectorization part is removed:
  :
  _33 = BIT_FIELD_REF ;


This is odd.

[Bug c++/78003] New: c++17: ICE in build_over_call, at cp/call.c:7847

2016-10-16 Thread jamrial at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78003

Bug ID: 78003
   Summary: c++17: ICE in build_over_call, at cp/call.c:7847
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jamrial at gmail dot com
  Target Milestone: ---

Created attachment 39820
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39820=edit
Preprocessed output as created by -freport-bug

/home/jamrial/range-v3/include/range/v3/detail/variant.hpp:679:35: internal
compiler error: in build_over_call, at cp/call.c:7847
 detail::variant_visit_(var.index(), data, detail::get_fn{});

~~^
0x646c0f build_over_call
/home/jamrial/gcc-svn/gcc/cp/call.c:7844
0x650edf build_new_method_call_1
/home/jamrial/gcc-svn/gcc/cp/call.c:8661
0x650edf build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int)
/home/jamrial/gcc-svn/gcc/cp/call.c:8731
0x651eae build_special_member_call(tree_node*, tree_node*, vec**, tree_node*, int, int)
/home/jamrial/gcc-svn/gcc/cp/call.c:8263
0x647d0d build_temp
/home/jamrial/gcc-svn/gcc/cp/call.c:6395
0x647d0d convert_like_real
/home/jamrial/gcc-svn/gcc/cp/call.c:6805
0x648f6c perform_implicit_conversion_flags(tree_node*, tree_node*, int, int)
/home/jamrial/gcc-svn/gcc/cp/call.c:9887
0x643e6b convert_default_arg(tree_node*, tree_node*, tree_node*, int, int)
/home/jamrial/gcc-svn/gcc/cp/call.c:7180
0x6447c0 build_over_call
/home/jamrial/gcc-svn/gcc/cp/call.c:7748
0x6549af build_new_function_call(tree_node*, vec**, bool, int)
/home/jamrial/gcc-svn/gcc/cp/call.c:4204
0x7eee4c finish_call_expr(tree_node*, vec**, bool,
bool, int)
/home/jamrial/gcc-svn/gcc/cp/semantics.c:2440
0x6c0298 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/jamrial/gcc-svn/gcc/cp/pt.c:16786
0x6b4d45 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/jamrial/gcc-svn/gcc/cp/pt.c:15952
0x6b2d87 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/jamrial/gcc-svn/gcc/cp/pt.c:15258
0x6b45cc tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/jamrial/gcc-svn/gcc/cp/pt.c:15244
0x6b4410 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/jamrial/gcc-svn/gcc/cp/pt.c:15435
0x6b1875 instantiate_decl(tree_node*, int, bool)
/home/jamrial/gcc-svn/gcc/cp/pt.c:22189
0x6fa71b instantiate_pending_templates(int)
/home/jamrial/gcc-svn/gcc/cp/pt.c:22306
0x73e361 c_parse_final_cleanups()
/home/jamrial/gcc-svn/gcc/cp/decl2.c:4506
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug target/71629] [7 Regression] ICE in lra_set_insn_recog_data, at lra.c:964 w/ -O2 -mlra

2016-10-16 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71629

--- Comment #7 from Segher Boessenkool  ---
Is this the same bug at all?  If not, please open a new PR.

[Bug c++/58796] throw nullptr not caught by catch(type*)

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58796

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.2 |6.3
  Known to fail||6.2.0

--- Comment #18 from Richard Biener  ---
GCC 6.2 is being released, adjusting target milestone

[Bug rtl-optimization/68749] FAIL: gcc.dg/ifcvt-4.c scan-rtl-dump ce1 "2 true changes made"

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68749

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.2 |6.3

[Bug target/71629] [7 Regression] ICE in lra_set_insn_recog_data, at lra.c:964 w/ -O2 -mlra

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71629

Arseny Solokha  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|FIXED   |---

--- Comment #6 from Arseny Solokha  ---
(In reply to Segher Boessenkool from comment #5)
> Both testcases build fine for me (with a powerpc-e500v2-linux-gnuspe
> compiler),
> with -fstack-protector -fPIC.
> 
> Closing as fixed; please reopen if it still fails for you.

When building 7.0.0_alpha20160814 snapshot:

In file included from
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/libsanitizer/asan/asan_interceptors.cc:196:0:
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:
In function 'SSIZE_T __interceptor_pread64(int, void*, SIZE_T, OFF64_T)':
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:584:1:
internal compiler error: in lra_set_insn_recog_data, at lra.c:964
 }
 ^
0xae0cf1123 lra_set_insn_recog_data(rtx_insn*)
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra.c:962
0xae0cf22f7 lra_get_insn_recog_data
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra-int.h:487
0xae0cf22f7 lra_update_insn_regno_info(rtx_insn*)
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra.c:1584
0xae0cf2750 lra_push_insn_1
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra.c:1735
0xae0cf2750 lra_push_insn(rtx_insn*)
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra.c:1743
0xae0cf29ef push_insns
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra.c:1786
0xae0cf2ff2 lra_process_new_insns(rtx_insn*, rtx_insn*, rtx_insn*, char const*)
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra.c:1844
0xae0cffd1e split_reg
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra-constraints.c:5378
0xae0d0090c inherit_in_ebb
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra-constraints.c:6187
0xae0d057fe lra_inheritance()
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra-constraints.c:6257
0xae0cf3f7e lra(_IO_FILE*)
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra.c:2402
0xae0ca2800 do_reload
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/ira.c:5385
0xae0ca2800 execute
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/ira.c:5569

Reducing this file gives:

namespace __sanitizer {
typedef long uptr;
typedef long sptr;
typedef long long OFF64_T;
}
using namespace __sanitizer;
namespace {
void AsanInitFromRtl();
extern int asan_inited;
}
typedef uptr SIZE_T;
typedef sptr SSIZE_T;
typedef SSIZE_T pread64_f(int, void *, SIZE_T, OFF64_T);
namespace __interception {
pread64_f real_pread64;
}
SSIZE_T
__interceptor_pread64(int fd, void *ptr, SIZE_T count, OFF64_T offset) {
  if (asan_inited)
AsanInitFromRtl();
  __interception::real_pread64(fd, ptr, count, offset);
}

%
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/build/./gcc/xg++
-B/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/build/gcc
-c -w -O2 asan_interceptors.i 
asan_interceptors.i: In function 'SSIZE_T __interceptor_pread64(int, void*,
SIZE_T, __sanitizer::OFF64_T)':
asan_interceptors.i:22:1: internal compiler error: in lra_set_insn_recog_data,
at lra.c:964
 }
 ^
0x79a9f30123 lra_set_insn_recog_data(rtx_insn*)
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra.c:962
0x79a9f312f7 lra_get_insn_recog_data
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra-int.h:487
0x79a9f312f7 lra_update_insn_regno_info(rtx_insn*)
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra.c:1584
0x79a9f31750 lra_push_insn_1
   
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160814/work/gcc-7-20160814/gcc/lra.c:1735
0x79a9f31750 lra_push_insn(rtx_insn*)
   

[Bug rtl-optimization/49857] Put constant switch-tables into flash

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49857

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.2 |6.3
  Known to fail||6.2.0

--- Comment #11 from Richard Biener  ---
GCC 6.2 is being released, adjusting target milestone

[Bug c++/66487] sanitizer/warnings for lifetime DSE

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66487

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.2 |6.3

[Bug c/39589] make -Wmissing-field-initializers=2 work with "designated initializers" ?

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39589

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.2 |6.3
  Known to fail||6.2.0

--- Comment #6 from Richard Biener  ---
GCC 6.2 is being released, adjusting target milestone

[Bug c++/65642] [C++11] GCC rejects valid constant expression

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65642

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.2 |6.3

[Bug c++/70019] VLA size overflow not detected

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70019

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.2 |6.3

[Bug target/35514] Gcc shoud generate symbol type for undefined symbol

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35514

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.2 |6.3
  Known to fail||6.2.0

--- Comment #4 from Richard Biener  ---
GCC 6.2 is being released, adjusting target milestone

[Bug middle-end/28628] Not forcing alignment of arrays in structs with -fsection-anchors

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28628

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.2 |6.3
  Known to fail||6.2.0

--- Comment #4 from Richard Biener  ---
GCC 6.2 is being released, adjusting target milestone

[Bug web/77551] Disable the priority and severity fields for users without editbugs privileges

2016-10-16 Thread LpSolit at netscape dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77551

Frédéric Buclin  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |LpSolit at netscape dot 
net
Summary|Please disable the  |Disable the priority and
   |"Importance:" field for |severity fields for users
   |normal users of bugzilla|without editbugs privileges
   Severity|normal  |enhancement

--- Comment #2 from Frédéric Buclin  ---
Done.

[Bug libstdc++/77998] clang rejects std::thread from trunk

2016-10-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77998

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-10-16
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
That result_type typedef is only there to satisfy some pieces of , so
I'll move it out of std::thread.

[Bug c++/77999] GCC diagnoses usage of STL literal operators as invalid.

2016-10-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77999

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-16
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
That's not an error. Using -Werror is cheating :P

This is similar to PR 57640, but apparently this slightly different case wasn't
fixed when that was.

[Bug tree-optimization/77938] missing tailcall optimization in case when local variable escapes that goes out of scope before the possible tail call site

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77938

Andrew Pinski  changed:

   What|Removed |Added

 Depends on||59813

--- Comment #4 from Andrew Pinski  ---
Related (maybe a dup really) to PR 59813.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59813
[Bug 59813] tail-call elimination didn't fire for left-shift of char to cout

[Bug ada/67205] eliminate No_Implicit_Dynamic_Code restriction violations

2016-10-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67205

Eric Botcazou  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

--- Comment #11 from Eric Botcazou  ---
Trampolines are gone on x86, PowerPC and SPARC.  AArch64 and ARM are the next
ones on the list.

[Bug tree-optimization/64031] (un-)conditional execution state is not preserved by PRE/sink

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64031

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug ada/37139] DEP prevents using Ada tasking

2016-10-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37139

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |7.0

--- Comment #3 from Eric Botcazou  ---
At last.

[Bug ada/67205] eliminate No_Implicit_Dynamic_Code restriction violations

2016-10-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67205

--- Comment #10 from Eric Botcazou  ---
Author: ebotcazou
Date: Sun Oct 16 20:13:32 2016
New Revision: 241222

URL: https://gcc.gnu.org/viewcvs?rev=241222=gcc=rev
Log:
PR ada/37139
PR ada/67205
* common.opt (-ftrampolines): New option.
* doc/invoke.texi (Code Gen Options): Document it.
* doc/tm.texi.in (Trampolines): Add TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
* doc/tm.texi: Regenerate.
* builtins.def: Add init_descriptor and adjust_descriptor.
* builtins.c (expand_builtin_init_trampoline): Do not issue a warning
on platforms with descriptors.
(expand_builtin_init_descriptor): New function.
(expand_builtin_adjust_descriptor): Likewise.
(expand_builtin) : New case.
: Likewise.
* calls.c (prepare_call_address): Remove SIBCALLP parameter and add
FLAGS parameter.  Deal with indirect calls by descriptor and adjust.
Set STATIC_CHAIN_REG_P on the static chain register, if any.
(call_expr_flags): Set ECF_BY_DESCRIPTOR for calls by descriptor.
(expand_call): Likewise.  Move around call to prepare_call_address
and pass all flags to it.
* cfgexpand.c (expand_call_stmt): Reinstate CALL_EXPR_BY_DESCRIPTOR.
* gimple.h (enum gf_mask): New GF_CALL_BY_DESCRIPTOR value.
(gimple_call_set_by_descriptor): New setter.
(gimple_call_by_descriptor_p): New getter.
* gimple.c (gimple_build_call_from_tree): SetCALL_EXPR_BY_DESCRIPTOR.
(gimple_call_flags): Deal with GF_CALL_BY_DESCRIPTOR.
* langhooks.h (struct lang_hooks): Add custom_function_descriptors.
* langhooks-def.h (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS): Define.
(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS.
* rtl.h (STATIC_CHAIN_REG_P): New macro.
* rtlanal.c (find_first_parameter_load): Skip static chain registers.
* target.def (custom_function_descriptors): New POD hook.
* tree.h (FUNC_ADDR_BY_DESCRIPTOR): New flag on ADDR_EXPR.
(CALL_EXPR_BY_DESCRIPTOR): New flag on CALL_EXPR.
* tree-core.h (ECF_BY_DESCRIPTOR): New mask.
Document FUNC_ADDR_BY_DESCRIPTOR and CALL_EXPR_BY_DESCRIPTOR.
* tree.c (make_node_stat) : Use FUNCTION_ALIGNMENT.
(build_common_builtin_nodes): Initialize init_descriptor and
adjust_descriptor.
* tree-nested.c: Include target.h.
(struct nesting_info): Add 'any_descr_created' field.
(get_descriptor_type): New function.
(lookup_element_for_decl): New function extracted from...
(create_field_for_decl): Likewise.
(lookup_tramp_for_decl): ...here.  Adjust.
(lookup_descr_for_decl): New function.
(convert_tramp_reference_op): Deal with descriptors.
(build_init_call_stmt): New function extracted from...
(finalize_nesting_tree_1): ...here.  Adjust and deal withdescriptors.
* defaults.h (FUNCTION_ALIGNMENT): Define.
(TRAMPOLINE_ALIGNMENT): Set to above instead of FUNCTION_BOUNDARY.
* config/i386/i386.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
* config/ia64/ia64.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Likewise.
* config/rs6000/rs6000.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS):Likewise.
* config/sparc/sparc.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Likewise.
ada/
* gcc-interface/misc.c (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS):Define.
* gcc-interface/trans.c (Attribute_to_gnu) : Deal with
a zero TARGET_CUSTOM_FUNCTION_DESCRIPTORS specially for Code_Address.
Otherwise, if TARGET_CUSTOM_FUNCTION_DESCRIPTORS is positive, set
FUNC_ADDR_BY_DESCRIPTOR for 'Access/'Unrestricted_Access of nested
subprograms if the type can use an internal representation.
(call_to_gnu): Likewise, but set CALL_EXPR_BY_DESCRIPTOR on indirect
calls if the type can use an internal representation.

Added:
trunk/gcc/testsuite/gnat.dg/trampoline3.adb
trunk/gcc/testsuite/gnat.dg/trampoline4.adb
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/gcc-interface/misc.c
trunk/gcc/ada/gcc-interface/trans.c
trunk/gcc/builtins.c
trunk/gcc/builtins.def
trunk/gcc/calls.c
trunk/gcc/cfgexpand.c
trunk/gcc/common.opt
trunk/gcc/config/i386/i386.h
trunk/gcc/config/ia64/ia64.h
trunk/gcc/config/rs6000/rs6000.h
trunk/gcc/config/sparc/sparc.h
trunk/gcc/defaults.h
trunk/gcc/doc/invoke.texi
trunk/gcc/doc/tm.texi
trunk/gcc/doc/tm.texi.in
trunk/gcc/gimple.c
trunk/gcc/gimple.h
trunk/gcc/langhooks-def.h
trunk/gcc/langhooks.h
trunk/gcc/rtl.h
trunk/gcc/rtlanal.c
trunk/gcc/target.def
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-core.h
trunk/gcc/tree-nested.c
trunk/gcc/tree.c
trunk/gcc/tree.h

[Bug ada/37139] DEP prevents using Ada tasking

2016-10-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37139

--- Comment #2 from Eric Botcazou  ---
Author: ebotcazou
Date: Sun Oct 16 20:13:32 2016
New Revision: 241222

URL: https://gcc.gnu.org/viewcvs?rev=241222=gcc=rev
Log:
PR ada/37139
PR ada/67205
* common.opt (-ftrampolines): New option.
* doc/invoke.texi (Code Gen Options): Document it.
* doc/tm.texi.in (Trampolines): Add TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
* doc/tm.texi: Regenerate.
* builtins.def: Add init_descriptor and adjust_descriptor.
* builtins.c (expand_builtin_init_trampoline): Do not issue a warning
on platforms with descriptors.
(expand_builtin_init_descriptor): New function.
(expand_builtin_adjust_descriptor): Likewise.
(expand_builtin) : New case.
: Likewise.
* calls.c (prepare_call_address): Remove SIBCALLP parameter and add
FLAGS parameter.  Deal with indirect calls by descriptor and adjust.
Set STATIC_CHAIN_REG_P on the static chain register, if any.
(call_expr_flags): Set ECF_BY_DESCRIPTOR for calls by descriptor.
(expand_call): Likewise.  Move around call to prepare_call_address
and pass all flags to it.
* cfgexpand.c (expand_call_stmt): Reinstate CALL_EXPR_BY_DESCRIPTOR.
* gimple.h (enum gf_mask): New GF_CALL_BY_DESCRIPTOR value.
(gimple_call_set_by_descriptor): New setter.
(gimple_call_by_descriptor_p): New getter.
* gimple.c (gimple_build_call_from_tree): SetCALL_EXPR_BY_DESCRIPTOR.
(gimple_call_flags): Deal with GF_CALL_BY_DESCRIPTOR.
* langhooks.h (struct lang_hooks): Add custom_function_descriptors.
* langhooks-def.h (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS): Define.
(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS.
* rtl.h (STATIC_CHAIN_REG_P): New macro.
* rtlanal.c (find_first_parameter_load): Skip static chain registers.
* target.def (custom_function_descriptors): New POD hook.
* tree.h (FUNC_ADDR_BY_DESCRIPTOR): New flag on ADDR_EXPR.
(CALL_EXPR_BY_DESCRIPTOR): New flag on CALL_EXPR.
* tree-core.h (ECF_BY_DESCRIPTOR): New mask.
Document FUNC_ADDR_BY_DESCRIPTOR and CALL_EXPR_BY_DESCRIPTOR.
* tree.c (make_node_stat) : Use FUNCTION_ALIGNMENT.
(build_common_builtin_nodes): Initialize init_descriptor and
adjust_descriptor.
* tree-nested.c: Include target.h.
(struct nesting_info): Add 'any_descr_created' field.
(get_descriptor_type): New function.
(lookup_element_for_decl): New function extracted from...
(create_field_for_decl): Likewise.
(lookup_tramp_for_decl): ...here.  Adjust.
(lookup_descr_for_decl): New function.
(convert_tramp_reference_op): Deal with descriptors.
(build_init_call_stmt): New function extracted from...
(finalize_nesting_tree_1): ...here.  Adjust and deal withdescriptors.
* defaults.h (FUNCTION_ALIGNMENT): Define.
(TRAMPOLINE_ALIGNMENT): Set to above instead of FUNCTION_BOUNDARY.
* config/i386/i386.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
* config/ia64/ia64.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Likewise.
* config/rs6000/rs6000.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS):Likewise.
* config/sparc/sparc.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Likewise.
ada/
* gcc-interface/misc.c (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS):Define.
* gcc-interface/trans.c (Attribute_to_gnu) : Deal with
a zero TARGET_CUSTOM_FUNCTION_DESCRIPTORS specially for Code_Address.
Otherwise, if TARGET_CUSTOM_FUNCTION_DESCRIPTORS is positive, set
FUNC_ADDR_BY_DESCRIPTOR for 'Access/'Unrestricted_Access of nested
subprograms if the type can use an internal representation.
(call_to_gnu): Likewise, but set CALL_EXPR_BY_DESCRIPTOR on indirect
calls if the type can use an internal representation.

Added:
trunk/gcc/testsuite/gnat.dg/trampoline3.adb
trunk/gcc/testsuite/gnat.dg/trampoline4.adb
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/gcc-interface/misc.c
trunk/gcc/ada/gcc-interface/trans.c
trunk/gcc/builtins.c
trunk/gcc/builtins.def
trunk/gcc/calls.c
trunk/gcc/cfgexpand.c
trunk/gcc/common.opt
trunk/gcc/config/i386/i386.h
trunk/gcc/config/ia64/ia64.h
trunk/gcc/config/rs6000/rs6000.h
trunk/gcc/config/sparc/sparc.h
trunk/gcc/defaults.h
trunk/gcc/doc/invoke.texi
trunk/gcc/doc/tm.texi
trunk/gcc/doc/tm.texi.in
trunk/gcc/gimple.c
trunk/gcc/gimple.h
trunk/gcc/langhooks-def.h
trunk/gcc/langhooks.h
trunk/gcc/rtl.h
trunk/gcc/rtlanal.c
trunk/gcc/target.def
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-core.h
trunk/gcc/tree-nested.c
trunk/gcc/tree.c
trunk/gcc/tree.h

[Bug target/78002] gcc.target/aarch64/stack-checking.c ICEs with -mabi=ilp32

2016-10-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78002

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-16
 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Eric Botcazou  ---
So ptr_mode vs Pmode mismatch?  If so, the irony is that the implementation as
submitted initially was using Pmode, but was changed upon explicit request:
  https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00418.html

[Bug target/78002] New: gcc.target/aarch64/stack-checking.c ICEs with -mabi=ilp32

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78002

Bug ID: 78002
   Summary: gcc.target/aarch64/stack-checking.c ICEs with
-mabi=ilp32
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64-linux-gnu

apinski@apinski-ss1:~/src/local4$ ./tools/bin/gcc -fstack-check
gcc/gcc/testsuite/gcc.target/aarch64/stack-checking.c  -mabi=ilp32
gcc/gcc/testsuite/gcc.target/aarch64/stack-checking.c: In function ‘main’:
gcc/gcc/testsuite/gcc.target/aarch64/stack-checking.c:21:1: internal compiler
error: in plus_constant, at explow.c:88
 }
 ^
0x7fbcdf plus_constant(machine_mode, rtx_def*, long, bool)
../../gcc/gcc/explow.c:88
0xe5d63f aarch64_emit_probe_stack_range
../../gcc/gcc/config/aarch64/aarch64.c:2575
0xe6253f aarch64_expand_prologue()
../../gcc/gcc/config/aarch64/aarch64.c:3216
0xfba47b gen_prologue()
../../gcc/gcc/config/aarch64/aarch64.md:551
0xe5cc83 target_gen_prologue
../../gcc/gcc/config/aarch64/aarch64.md:5584
0x886577 make_prologue_seq
../../gcc/gcc/function.c:5810
0x886797 thread_prologue_and_epilogue_insns()
../../gcc/gcc/function.c:5927
0x886dfb rest_of_handle_thread_prologue_and_epilogue
../../gcc/gcc/function.c:6396
0x886dfb execute
../../gcc/gcc/function.c:6438
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug target/77991] ICE on x32 in plus_constant, at explow.c:87

2016-10-16 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77991

Uroš Bizjak  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #3 from Uroš Bizjak  ---
HJ, can you please test the proposed patch on x32?

[Bug target/77991] ICE on x32 in plus_constant, at explow.c:87

2016-10-16 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77991

Uroš Bizjak  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ubizjak at gmail dot com

--- Comment #2 from Uroš Bizjak  ---
Created attachment 39819
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39819=edit
Proposed patch

Patch that adds missing conversion to Pmode.

[Bug fortran/77915] [6 Regression] Internal error for matmul() in forall with optimization

2016-10-16 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77915

Thomas Koenig  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Thomas Koenig  ---
Fixed on all affected branches, closing.

[Bug fortran/77915] [6 Regression] Internal error for matmul() in forall with optimization

2016-10-16 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77915

--- Comment #4 from Thomas Koenig  ---
Author: tkoenig
Date: Sun Oct 16 18:16:29 2016
New Revision: 241217

URL: https://gcc.gnu.org/viewcvs?rev=241217=gcc=rev
Log:
2016-10-16  Thomas Koenig  

Backport from trunk
PR fortran/77915
* frontend-passes.c (inline_matmul_assign):  Return early if
inside a FORALL statement.

2016-10-16  Thomas Koenig  

Backport from trunk
PR fortran/77915
* gfortran.dg/matmul_11.f90:  New test.

Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/matmul_11.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/frontend-passes.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug middle-end/77996] Miscompilation due to LTO on aarch64

2016-10-16 Thread yyc1992 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77996

--- Comment #11 from Yichao Yu  ---
The case pointed out is fixed in https://reviews.llvm.org/rL284336 although as
expected that doesn't fix the error. Still not sure whose bug is this...

[Bug testsuite/64886] FAIL: gcc.dg/pr64434.c scan-rtl-dump-times expand "Swap operands" 1

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64886

Andrew Pinski  changed:

   What|Removed |Added

 Target|hppa*-*-hpux*   |hppa*-*-hpux*
   ||aarch64_ilp32-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-16
  Component|rtl-optimization|testsuite
   Host|hppa*-*-hpux*   |
 Ever confirmed|0   |1
  Build|hppa*-*-hpux*   |

--- Comment #5 from Andrew Pinski  ---
Same as reason on aarch64 ILP32.

Confirmed.

[Bug c++/78001] [7 Regression] ncurses build error

2016-10-16 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001

--- Comment #5 from Markus Trippelsdorf  ---
Well,

markus@x4 ~ % clang++ -c n.ii
n.ii:6:24: error: member function 'm_fn1' not viable: 'this' argument has type
'const B', but function is not marked const
  void m_fn2() const { m_fn1(); }
   ^
n.ii:3:8: note: 'm_fn1' declared here
  void m_fn1();
   ^
1 error generated.

is clear immediately.

[Bug target/77897] Compile error with KNL & -O3 for GTC code

2016-10-16 Thread longb at cray dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77897

--- Comment #3 from Bill Long  ---
It would appear the customer system has

> /usr/bin/as --version
GNU assembler (GNU Binutils; SUSE Linux Enterprise 12) 2.25.0

[Bug c++/78001] [7 Regression] ncurses build error

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001

--- Comment #4 from Andrew Pinski  ---
(In reply to Markus Trippelsdorf from comment #3)
> And the error message is horrible.

The only part of the error message which seems really horrible is the
"" part which is related to bug 54948 (there seems like
there are others too).

[Bug c++/78001] [7 Regression] ncurses build error

2016-10-16 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001

--- Comment #3 from Markus Trippelsdorf  ---
And the error message is horrible.

[Bug c++/78001] [7 Regression] ncurses build error

2016-10-16 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Markus Trippelsdorf  ---
(In reply to Andrew Pinski from comment #1)

I guess you are right. There must be some dups somewhere, but I cannot 
find them ATM.

[Bug c++/78001] [7 Regression] ncurses build error

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001

--- Comment #1 from Andrew Pinski  ---
So I think GCC is correct here.  A is a non-dependent base so it can be looked
at definition time.  m_fn1 is not a const qualified either.

Does other compiler reject:
class A {
protected:
  void m_fn1();
};
struct B : A {
  void m_fn2() const { m_fn1(); }
};


How about:
class A {
protected:
  void m_fn1();
};
template  struct B : A {
  void m_fn2() const { m_fn1(); }
};

B a;
void f(void) { a.m_fn2(); }

[Bug tree-optimization/64322] More optimize opportunity for constant folding

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64322

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug fortran/48298] [F03] User-Defined Derived-Type IO (DTIO)

2016-10-16 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48298

--- Comment #27 from Jerry DeLisle  ---
The patch in comment 26 addressed the behavior of inquire(iolength= ) when
derived types with User Defined procedures are in the Output List.

The only other case I see not addressed yet is the size= specifier in input
statements. I do not see where the Standards specifically address this for User
Defined. Should it behave similar to IOLENGTH or try to accumulate the size
from all child procedures?

[Bug c++/78001] [7 Regression] ncurses build error

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||rejects-valid
   Target Milestone|--- |7.0

[Bug sanitizer/64354] no preprocessor symbol __SANITIZE_THREAD__

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64354

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.0

--- Comment #4 from Andrew Pinski  ---
Fixed.

[Bug c++/78001] New: [7 Regression] ncurses build error

2016-10-16 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001

Bug ID: 78001
   Summary: [7 Regression] ncurses build error
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

markus@x4 tmp % cat cursesf.ii
class A {
protected:
  void m_fn1();
};
template  struct B : A {
  void m_fn2() const { m_fn1(); }
};

markus@x4 tmp % icpc -c cursesf.ii
markus@x4 tmp % clang++ -c cursesf.ii
markus@x4 tmp % g++-6 -c cursesf.ii
markus@x4 tmp % g++ -c cursesf.ii
cursesf.ii: In member function ‘void B<  >::m_fn2()
const’:
cursesf.ii:6:30: error: no matching function for call to ‘B<
 >::m_fn1() const’
   void m_fn2() const { m_fn1(); }
  ^
cursesf.ii:3:8: note: candidate: void A::m_fn1() 
   void m_fn1();
^
cursesf.ii:3:8: note:   passing ‘const B<  >*’ as
‘this’ argument discards qualifiers

[Bug fortran/48298] [F03] User-Defined Derived-Type IO (DTIO)

2016-10-16 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48298

--- Comment #26 from Jerry DeLisle  ---
Author: jvdelisle
Date: Sun Oct 16 16:29:46 2016
New Revision: 241216

URL: https://gcc.gnu.org/viewcvs?rev=241216=gcc=rev
Log:
2016-10-16  Jerry DeLisle  

PR fortran/48298
* trans-io.c (transfer_expr): Ignore dtio procedures for inquire
with iolength.

* gfortran.dg/dtio_16.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/dtio_16.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-io.c
trunk/gcc/testsuite/ChangeLog

[Bug c/77992] Failures to initialize padding bytes -- causing many information leaks

2016-10-16 Thread kjlu at gatech dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77992

--- Comment #13 from Kangjie Lu  ---
(In reply to jos...@codesourcery.com from comment #10)
> If you care about information in bytes that are not part of a field with 
> other semantic significance, you should use -Werror=padded to get errors 
> on structs with padding and use that information to add explicit dummy 
> fields in the source code where there was padding.  Once there are 
> explicit dummy fields, their values will be preserved by the compiler, so 
> you can either zero the whole struct with memset and rely on the zeroing 
> of dummy fields not being optimized away, or use a struct initializer and 
> rely on it implicitly zeroing those fields.  (Of course this may reduce 
> efficiency as optimizations such as SRA now need to track values of those 
> fields, whereas they do not need to track values of padding.)

This is a candidate solution, but I think it cannot scale.  
Given that the Linux kernel has tens of thousands of modules, the idea of 
manually initializing padding bytes for all data structures will be definitely 
declined by the Linux community. 

My opinion is still that, as padding is introduced by compilers and is 
"invisible" to developers, initializing padding should be done by on the 
compiler side.

[Bug c/77992] Failures to initialize padding bytes -- causing many information leaks

2016-10-16 Thread kjlu at gatech dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77992

--- Comment #12 from Kangjie Lu  ---
(In reply to Andreas Schwab from comment #11)
> The problem with that strategy is that padding is architecture dependent,
> and care must be taken not to introduce ABI breakage.

Agreed. Or a developer will have to write corresponding dummy fields for 
various platforms, which will be annoying for code maintenance.

[Bug c/77992] Failures to initialize padding bytes -- causing many information leaks

2016-10-16 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77992

--- Comment #11 from Andreas Schwab  ---
The problem with that strategy is that padding is architecture dependent, and
care must be taken not to introduce ABI breakage.

[Bug c/78000] New: -Wimplicit-function-declaration inhibited with macro from system headers

2016-10-16 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78000

Bug ID: 78000
   Summary: -Wimplicit-function-declaration inhibited with macro
from system headers
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: glisse at gcc dot gnu.org
  Target Milestone: ---

i/a.h:
#define foo bar

x.c:
#include 
int main(){
  foo(42);
}

$ gcc x.c -isystem i -c
$ gcc x.c -I i -c
In file included from x.c:1:0:
x.c: In function ‘main’:
i/a.h:1:13: warning: implicit declaration of function ‘bar’
[-Wimplicit-function-declaration]
 #define foo bar
 ^
x.c:4:3: note: in expansion of macro ‘foo’
   foo(42);
   ^~~

This problem occurs for instance with GMP headers (installed by the
distribution in /usr/include) that have
#define mpf_out_str __gmpf_out_str
but only declare the function if stdio.h was included first. Users don't get
any indication that they are using an undeclared function.
http://stackoverflow.com/q/40069876/1918193

At least in this case, it seems that it would be better to use the location of
'foo(42)' to determine if the issue is in a system header or not. Are there
cases where the current behavior is preferred?

[Bug bootstrap/77995] [6 regression] bootstrap comparison failure on x86-64/Solaris

2016-10-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77995

Eric Botcazou  changed:

   What|Removed |Added

 Target|solaris |x86_64-sun-solaris2.*
 Status|WAITING |ASSIGNED
  Known to work||5.4.1
   Host||x86_64-sun-solaris2.*
   Assignee|unassigned at gcc dot gnu.org  |ebotcazou at gcc dot 
gnu.org
Summary|gcc 6.2.0 failed on |[6 regression] bootstrap
   |somparison stage 2 & 3  |comparison failure on
   ||x86-64/Solaris
   Target Milestone|--- |6.3
  Known to fail||6.2.1
  Build||x86_64-sun-solaris2.*

--- Comment #7 from Eric Botcazou  ---
> thanks a lot for proposed patch - i can confirm: it fixed my problem with
> bootstrap on Intel.

Great, thanks for reporting back.

> next step will be - try to test in SPARC :) (i have T5220).

SPARC should bootstrap with or without the patch.

[Bug c/77992] Failures to initialize padding bytes -- causing many information leaks

2016-10-16 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77992

--- Comment #10 from joseph at codesourcery dot com  ---
If you care about information in bytes that are not part of a field with 
other semantic significance, you should use -Werror=padded to get errors 
on structs with padding and use that information to add explicit dummy 
fields in the source code where there was padding.  Once there are 
explicit dummy fields, their values will be preserved by the compiler, so 
you can either zero the whole struct with memset and rely on the zeroing 
of dummy fields not being optimized away, or use a struct initializer and 
rely on it implicitly zeroing those fields.  (Of course this may reduce 
efficiency as optimizations such as SRA now need to track values of those 
fields, whereas they do not need to track values of padding.)

[Bug c++/77999] New: GCC leaks system header diagnostic about reserved names.

2016-10-16 Thread eric at efcs dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77999

Bug ID: 77999
   Summary: GCC leaks system header diagnostic about reserved
names.
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eric at efcs dot ca
  Target Milestone: ---

Reproducer:
// g++ -std=c++14 -Werror test.cpp
#include 
using std::chrono::operator ""h; // error emitted on this line.
// {{error: literal operator suffixes not preceded by '_' are reserved for
future standardization}}

[Bug bootstrap/77995] gcc 6.2.0 failed on somparison stage 2 & 3

2016-10-16 Thread ikozhukhov at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77995

--- Comment #6 from Igor Kozhukhov  ---
(In reply to Eric Botcazou from comment #4)
> If BUILD_CONFIG is empty, then a possible fix is at:
>   https://gcc.gnu.org/ml/gcc-cvs/2016-10/msg00278.html

thanks a lot for proposed patch - i can confirm: it fixed my problem with
bootstrap on Intel.
next step will be - try to test in SPARC :) (i have T5220).
i'll reply to this bug or open new if it failed.

[Bug target/77991] ICE on x32 in plus_constant, at explow.c:87

2016-10-16 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77991

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-16
 CC||marxin at gcc dot gnu.org
Summary|[7 Regression] ICE on x32   |ICE on x32 in
   |in plus_constant, at|plus_constant, at
   |explow.c:87 |explow.c:87
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, started with GCC 4.8.0.

[Bug tree-optimization/77988] [7 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: verify_gimple failed

2016-10-16 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77988

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-16
 CC||marxin at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, started with r241021.

[Bug c++/51392] Wrong code with -Os when __attribute__((__const__)) function returns structure

2016-10-16 Thread cyp561 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51392

--- Comment #4 from cyp561 at gmail dot com ---
Is there any case in which a function returning a structure may not elide the
return value copy to being passed by invisible reference?

If not, I think it is either a bug that the code fails, or a bug that the C++
frontend allows __attribute__((__const__)) on any function which returns a
structure.

It seems strange to me that __attribute__((__const__)) doesn't work in cases
where constexpr does work, since I thought constexpr is a now-standard version
of __attribute__((__const__)).

[Bug target/59558] [MSP430-gcc] CPU setup, pre start program

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59558

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Andrew Pinski  ---
Invalid then .

[Bug other/64184] error: '_SC_NPROCESSORS_ONLN' undeclared (first use in this function)

2016-10-16 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64184

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-10-16
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Has this been fixed in a newer version of GCC like say 5.4.0?

[Bug libfortran/48587] Avoid exhausting unit number with NEWUNIT=

2016-10-16 Thread jb at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48587

Janne Blomqvist  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Janne Blomqvist  ---
Fixed on trunk, closing.

[Bug libfortran/48587] Avoid exhausting unit number with NEWUNIT=

2016-10-16 Thread jb at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48587

--- Comment #10 from Janne Blomqvist  ---
Author: jb
Date: Sun Oct 16 06:28:15 2016
New Revision: 241211

URL: https://gcc.gnu.org/viewcvs?rev=241211=gcc=rev
Log:
PR 48587 Newunit allocator, cleanup

Improve error message, and remove a redundant check, as the same check is
done a bit earlier due to the PR 48587 patch.

2016-10-16  Janne Blomqvist  

PR libfortran/48587
* io/transfer.c (data_transfer_init): Improve error message,
remove redundant check.

Regtested on x86_64-pc-linux-gnu.

Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/transfer.c

[Bug libstdc++/77998] New: clang rejects std::thread from trunk

2016-10-16 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77998

Bug ID: 77998
   Summary: clang rejects std::thread from trunk
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

markus@x4 tmp % cat thread.cpp
#include 
#include 

int main() {
  std::vector threads;
  threads.emplace_back([]() {});
}

markus@x4 tmp % g++ -c thread.cpp
markus@x4 tmp % clang++ -c thread.cpp
In file included from thread.cpp:1:
/usr/lib64/gcc/x86_64-pc-linux-gnu/7.0.0/include/g++-v7/thread:239:39: error:
member access into incomplete type 'std::thread::_Invoker >'
  = decltype(std::declval<_Invoker>()._M_invoke(_Indices()));
 ^
/usr/lib64/gcc/x86_64-pc-linux-gnu/7.0.0/include/g++-v7/thread:126:8: note: in
instantiation of template class 'std::thread::_Invoker >'
  requested here
  __make_invoker(std::forward<_Callable>(__f),
  ^
/usr/lib64/gcc/x86_64-pc-linux-gnu/7.0.0/include/g++-v7/ext/new_allocator.h:120:23:
note: in instantiation of function template specialization
  'std::thread::thread<(lambda at thread.cpp:6:24)>' requested here
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
 ^
/usr/lib64/gcc/x86_64-pc-linux-gnu/7.0.0/include/g++-v7/bits/alloc_traits.h:455:8:
note: in instantiation of function template specialization
  '__gnu_cxx::new_allocator::construct' requested here
{ __a.construct(__p, std::forward<_Args>(__args)...); }
  ^
/usr/lib64/gcc/x86_64-pc-linux-gnu/7.0.0/include/g++-v7/bits/vector.tcc:96:21:
note: in instantiation of function template specialization
  'std::allocator_traits::construct' requested here
_Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
   ^
thread.cpp:6:11: note: in instantiation of function template specialization
'std::vector::emplace_back<(lambda
at thread.cpp:6:24)>'
  requested here
  threads.emplace_back([]() {});
  ^
/usr/lib64/gcc/x86_64-pc-linux-gnu/7.0.0/include/g++-v7/thread:220:14: note:
definition of 'std::thread::_Invoker >'
is not complete until
  the closing '}'
  struct _Invoker
 ^
1 error generated.