[Bug middle-end/71252] [7 Regression] ICE: verify_ssa failed : definition in block 7 does not dominate use in block 6

2016-05-23 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71252

kugan at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kugan at gcc dot gnu.org

--- Comment #1 from kugan at gcc dot gnu.org ---
This looks like an issue with my reassociation commit. I will have a look.

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

--- Comment #12 from Marc Glisse  ---
-fwrapv seems to fix it. As far as I can tell, the multiplication is done in 32
bits, VRP detects that the numbers are nonnegative, so zeroing the sign bit of
the result of the mult+add can be assumed to be a NOP.

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

--- Comment #11 from Uroš Bizjak  ---
(In reply to Andrew Pinski from comment #8)
> This code has the following warning:
> !CRAY - The following multiply must be done with 64 bits (not 46 bits)
> !   The algoritm depends on the overflow characteristics of
> !   a 32 or 64 bit multiply.
> 
> 
> So the code is implicitly saying it needs to be done using overflow as
> wrapping for signed integer but in Fortran, overflow is undefined.

Indeed, "-Ofast -fwrapv" fixes run time and produces the correct result.

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

--- Comment #10 from Uroš Bizjak  ---
Created attachment 38548
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38548&action=edit
Missing include file

(In reply to Andrew Pinski from comment #9)
> By the way the source does not compile as you did not include 'rnfprm.h'.

Ops, sorry ... attached now.

[Bug middle-end/71252] New: [7 Regression] ICE: verify_ssa failed : definition in block 7 does not dominate use in block 6

2016-05-23 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71252

Bug ID: 71252
   Summary: [7 Regression] ICE: verify_ssa failed : definition in
block 7 does not dominate use in block 6
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Joost.VandeVondele at mat dot ethz.ch
  Target Milestone: ---

today's trunk:

> cat bug.f90
MODULE xc_b97
  INTEGER, PARAMETER :: dp=8
  PRIVATE
  PUBLIC :: b97_lda_info, b97_lsd_info, b97_lda_eval, b97_lsd_eval
CONTAINS
  SUBROUTINE b97_lsd_eval(rho_set,deriv_set,grad_deriv,b97_params)
INTEGER, INTENT(in)  :: grad_deriv
INTEGER  :: handle, npoints, param, stat
LOGICAL  :: failure
REAL(kind=dp):: epsilon_drho, epsilon_rho, &
scale_c, scale_x
REAL(kind=dp), DIMENSION(:, :, :), POINTER :: dummy, e_0, e_ndra, &
  e_ndra_ndra, e_ndra_ndrb, e_ndra_ra, e_ndra_rb, e_ndrb, e_ndrb_ndrb, &
  e_ndrb_ra, e_ndrb_rb, e_ra, e_ra_ra, e_ra_rb, e_rb, e_rb_rb, &
  norm_drhoa, norm_drhob, rhoa, rhob
IF (.NOT. failure) THEN
   CALL b97_lsd_calc(&
rhoa=rhoa, rhob=rhob, norm_drhoa=norm_drhoa,&
norm_drhob=norm_drhob, e_0=e_0, &
e_ra=e_ra, e_rb=e_rb, &
e_ndra=e_ndra, e_ndrb=e_ndrb, &
e_ra_ra=e_ra_ra, e_ra_rb=e_ra_rb, e_rb_rb=e_rb_rb,&
e_ra_ndra=e_ndra_ra, e_ra_ndrb=e_ndrb_ra, &
e_rb_ndrb=e_ndrb_rb, e_rb_ndra=e_ndra_rb,&
e_ndra_ndra=e_ndra_ndra, e_ndrb_ndrb=e_ndrb_ndrb,&
e_ndra_ndrb=e_ndra_ndrb,&
grad_deriv=grad_deriv, npoints=npoints, &
epsilon_rho=epsilon_rho,epsilon_drho=epsilon_drho,&
param=param,scale_c_in=scale_c,scale_x_in=scale_x)
END IF
  END SUBROUTINE b97_lsd_eval
  SUBROUTINE b97_lsd_calc(rhoa, rhob, norm_drhoa, norm_drhob,&
   e_0, e_ra, e_rb, e_ndra, e_ndrb, &
   e_ra_ndra,e_ra_ndrb, e_rb_ndra, e_rb_ndrb,&
   e_ndra_ndra, e_ndrb_ndrb, e_ndra_ndrb, &
   e_ra_ra, e_ra_rb, e_rb_rb,&
   grad_deriv,npoints,epsilon_rho,epsilon_drho, &
   param, scale_c_in, scale_x_in)
REAL(kind=dp), DIMENSION(*), INTENT(in)  :: rhoa, rhob, norm_drhoa, &
norm_drhob
REAL(kind=dp), DIMENSION(*), INTENT(inout) :: e_0, e_ra, e_rb, e_ndra, &
  e_ndrb, e_ra_ndra, e_ra_ndrb, e_rb_ndra, e_rb_ndrb, e_ndra_ndra, &
  e_ndrb_ndrb, e_ndra_ndrb, e_ra_ra, e_ra_rb, e_rb_rb
INTEGER, INTENT(in)  :: grad_deriv, npoints
REAL(kind=dp), INTENT(in):: epsilon_rho, epsilon_drho
INTEGER, INTENT(in)  :: param
REAL(kind=dp), INTENT(in):: scale_c_in, scale_x_in
REAL(kind=dp) :: A_1, A_2, A_3, alpha_1_1, alpha_1_2, alpha_1_3, alpha_c, &
  t133, t134, t1341, t1348, t1351, t1360, t1368, t138, t1388, t139, &
  u_x_bnorm_drhobnorm_drhob, u_x_brhob, u_x_brhobnorm_drhob, u_x_brhobrhob
SELECT CASE(grad_deriv)
CASE default
   DO ii=1,npoints
  IF (rho>epsilon_rho) THEN
 IF (grad_deriv/=0) THEN
IF (grad_deriv>1 .OR. grad_deriv<-1) THEN
   alpha_c1rhob = alpha_crhob
   f1rhob = frhob
   t1360 = -0.4e1_dp * t105 * t290 * chirhobrhob + (-0.2e1_dp *
t239 &
* t257 + t709 * t1236 * t711 * t62 / 0.2e1_dp -
e_c_u_0rhobrhob) * f&
* t108 + t438 * f1rhob * t108 + 0.4e1_dp * t439 * t443
+ t1341 * &
0.4e1_dp * t1348 * t443 + 0.4e1_dp * t1351 * t443 +
0.12e2_dp * t113&
* t107 * t1299 + 0.4e1_dp * t113 * t289 * chirhobrhob
   IF (grad_deriv>1 .OR. grad_deriv==-2) THEN
   exc_rhob_rhob = scale_x * (-t4 * t6 / t1152 * gx_b / &
0.6e1_dp + e_lsda_x_brhob * (u_x_b1rhob * t31 +
u_x_b * u_x_b1rhob *&
u_x_brhobrhob * c_x_2)) + scale_c *
(((e_c_u_0rhobrhob + (0.2e1_dp *&
t726 * t1270 * t278 - t266 * (-t731 * t1205 /
0.4e1_dp + t267 * &
t1205 * t647) * t278 - t757 * t1270 * t759 * t80 /
0.2e1_dp) * f * &
t110 + alpha_crhob * f1rhob * t110 - 0.4e1_dp *
t431 * t435 + &
alpha_c1rhob * frhob * t110 + alpha_c * frhobrhob *
t110 - 0.4e1_dp &
* t433 * t435 - 0.4e1_dp * t1321 * t435 - 0.4e1_dp
* t1324 * t435 - &
0.12e2_dp * t105 * t796 * t1299 + t1360) * rho +
epsilon_c_unifrhob &
* c_css_2))
   e_rb_rb(ii)=e_rb_rb(ii)+exc_rhob_rhob
   END IF
 

[Bug libfortran/71123] Namelist read failure on Windows

2016-05-23 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71123

--- Comment #5 from Jerry DeLisle  ---
(In reply to Jerry DeLisle from comment #4)
> Author: jvdelisle
> Date: Tue May 24 06:16:00 2016
> New Revision: 236629
> 
> URL: https://gcc.gnu.org/viewcvs?rev=236629&root=gcc&view=rev
> Log:
> 2016-05-23  Jerry DeLisle  
> 
>   PR libgfortran/71123
>   * io/list_read (eat_spaces): Eat '\r' as part of spaces.
> fix change log
> 
> Modified:
> trunk/libgfortran/ChangeLog

(In reply to Jerry DeLisle from comment #21)
> Author: jvdelisle
> Date: Tue May 24 06:11:21 2016
> New Revision: 236628
> 
> URL: https://gcc.gnu.org/viewcvs?rev=236628&root=gcc&view=rev
> Log:
> 2016-05-23  Jerry DeLisle  
> 
>   PR libgfortran/70684
>   * io/list_read (eat_spaces): Eat '\r' as part of spaces.
> 
>   * gfortran.dg/namelist_90.f: New test
> 
> Added:
> trunk/gcc/testsuite/gfortran.dg/namelist_90.f
> Modified:
> trunk/gcc/testsuite/ChangeLog
> trunk/libgfortran/ChangeLog
> trunk/libgfortran/io/list_read.c

Had wrong PR number in changelog. Fixed

[Bug libfortran/70684] [4.9/5/6/7 Regression] incorrect reading of values from file on Windows

2016-05-23 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70684

--- Comment #22 from Jerry DeLisle  ---
(In reply to Jerry DeLisle from comment #21)
> Author: jvdelisle
> Date: Tue May 24 06:11:21 2016
> New Revision: 236628
> 
> URL: https://gcc.gnu.org/viewcvs?rev=236628&root=gcc&view=rev
> Log:
> 2016-05-23  Jerry DeLisle  
> 
>   PR libgfortran/70684
>   * io/list_read (eat_spaces): Eat '\r' as part of spaces.
> 
>   * gfortran.dg/namelist_90.f: New test
> 
> Added:
> trunk/gcc/testsuite/gfortran.dg/namelist_90.f
> Modified:
> trunk/gcc/testsuite/ChangeLog
> trunk/libgfortran/ChangeLog
> trunk/libgfortran/io/list_read.c

My apologies, this should be for PR71223

[Bug libfortran/71123] Namelist read failure on Windows

2016-05-23 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71123

--- Comment #4 from Jerry DeLisle  ---
Author: jvdelisle
Date: Tue May 24 06:16:00 2016
New Revision: 236629

URL: https://gcc.gnu.org/viewcvs?rev=236629&root=gcc&view=rev
Log:
2016-05-23  Jerry DeLisle  

PR libgfortran/71123
* io/list_read (eat_spaces): Eat '\r' as part of spaces.
fix change log

Modified:
trunk/libgfortran/ChangeLog

[Bug libfortran/70684] [4.9/5/6/7 Regression] incorrect reading of values from file on Windows

2016-05-23 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70684

--- Comment #21 from Jerry DeLisle  ---
Author: jvdelisle
Date: Tue May 24 06:11:21 2016
New Revision: 236628

URL: https://gcc.gnu.org/viewcvs?rev=236628&root=gcc&view=rev
Log:
2016-05-23  Jerry DeLisle  

PR libgfortran/70684
* io/list_read (eat_spaces): Eat '\r' as part of spaces.

* gfortran.dg/namelist_90.f: New test

Added:
trunk/gcc/testsuite/gfortran.dg/namelist_90.f
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/list_read.c

[Bug c++/71243] Implicitly defined assignment operator is not constexpr even though it should be

2016-05-23 Thread michele.caini at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71243

--- Comment #2 from Michele Caini  ---
According to https://gcc.gnu.org/projects/cxx-status.html#cxx14, GCC5 should
fully implement the C++14 rules. Am I wrong?
Anyway, tested on debian sid (unstable), g++ v5.3.1-20 and it works.
I guess this can be closed as FIXED because of that.
I suspect it has been fixed as a side-effect of another issue, for I've not
been able to find a bug report for this.

[Bug c++/71193] [6/7 Regression] error: invalid use of incomplete type

2016-05-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71193

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #1 from Jason Merrill  ---
The standard quite clearly says that this code is ill-formed, no diagnostic
required.

14.6/8: "If a hypothetical instantiation of a template immediately following
its definition would be ill-formed due to a construct that does not depend on a
template parameter, the program is ill-formed; no diagnostic is required.  If
the interpretation of such a construct in the hypothetical instantiation is
different from the interpretation of the corresponding construct in any actual
instantiation of the template, the program is ill-formed; no diagnostic is
required. [ Note: This can happen in situations including the following:
* a type used in a non-dependent name is incomplete at the point at which a
template is defined but is complete at the point at which an instantiation is
performed, "

[Bug c++/70344] [6/7 Regression] ICE on invalid code at -O1 and above on x86_64-linux-gnu in record_reference, at cgraphbuild.c:64

2016-05-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70344

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #11 from Jason Merrill  ---
Fixed.

[Bug fortran/66461] [4.9/5/6/7 Regression] ICE on missing end program in fixed source

2016-05-23 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66461

--- Comment #24 from Jerry DeLisle  ---
Author: jvdelisle
Date: Tue May 24 04:15:39 2016
New Revision: 236627

URL: https://gcc.gnu.org/viewcvs?rev=236627&root=gcc&view=rev
Log:
2016-05-23  Jerry DeLisle  

PR fortran/66461
* scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
current locus back to old_locus.

* gfortran.dg/unexpected_eof.f: New test

Added:
trunk/gcc/testsuite/gfortran.dg/unexpected_eof.f
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/scanner.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/70344] [6/7 Regression] ICE on invalid code at -O1 and above on x86_64-linux-gnu in record_reference, at cgraphbuild.c:64

2016-05-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70344

--- Comment #10 from Jason Merrill  ---
Author: jason
Date: Tue May 24 03:37:10 2016
New Revision: 236626

URL: https://gcc.gnu.org/viewcvs?rev=236626&root=gcc&view=rev
Log:
PR c++/70344 - ICE with recursive constexpr

* constexpr.c (cxx_eval_call_expression): Check for
fun == current_function_decl again.

Modified:
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/constexpr.c
branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-recursion2.C

[Bug c++/70344] [6/7 Regression] ICE on invalid code at -O1 and above on x86_64-linux-gnu in record_reference, at cgraphbuild.c:64

2016-05-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70344

--- Comment #9 from Jason Merrill  ---
Author: jason
Date: Tue May 24 03:34:55 2016
New Revision: 236625

URL: https://gcc.gnu.org/viewcvs?rev=236625&root=gcc&view=rev
Log:
PR c++/70344 - ICE with recursive constexpr

* constexpr.c (cxx_eval_call_expression): Check for
fun == current_function_decl again.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-recursion2.C

[Bug c/71249] -Wswitch-unreachable false positive for a compound statement containing a used label

2016-05-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71249

--- Comment #2 from Martin Sebor  ---
Ah, right, my mistake.  But there is a false positive there, despite my initial
test case not demonstrating it.  Changing the first of the compound statement
to some other non-label statement such as a declaration shows that
(interestingly, the test case below only issues as warning with G++ and not
GCC).  It seems to me that to avoid the false positive the algorithm needs to
consider more than just the first statement.  It either needs to look for label
in the compound statement that can be reached from outside it, or it needs to
ignore declarations and other things that precede it and don't emit executable
code.

$ cat xxx.c && /build/gcc-trunk-svn/gcc/xgcc -B /build/gcc-trunk-svn/gcc
-Wswitch-unreachable -xc++ xxx.c
int f (int i)
{
  switch (i) {
  { int j; foo: return i; };
  case 3: goto foo;
  }
  return i;
}

xxx.c: In function ‘int f(int)’:
xxx.c:4:25: warning: statement will never be executed [-Wswitch-unreachable]
   { int j; foo: return i; };
 ^

[Bug c++/71251] New: ICE on invalid code, with unusual template name

2016-05-23 Thread rippey.e at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71251

Bug ID: 71251
   Summary: ICE on invalid code, with unusual template name
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rippey.e at gmail dot com
  Target Milestone: ---

With g++ trunk this code:

template
template
using U=void;

template
struct S1;

template
struct S1>{
template
struct S2:S2{};
};

produces the following error message:

b1.cpp:11:16: internal compiler error: tree check: accessed elt 2 of tree_vec
with 1 elts in tsubst, at cp/pt.c:12961
  struct S2:S2{};
^
0x100f665 tree_vec_elt_check_failed(int, int, char const*, int, char const*)
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/tree.c:9950
0x722439 tree_vec_elt_check(tree_node const*, int, char const*, int, char
const*)
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/tree.h:3477
0x6ea386 tsubst(tree_node*, tree_node*, int, tree_node*)
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:12961
0x6e0dc0 tsubst_copy
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:14077
0x6e679b tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:17161
0x6db38a tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:15800
0x6fc6ea tsubst_template_args
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:11223
0x6fc9d2 tsubst_template_args
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:11183
0x6e9aac tsubst(tree_node*, tree_node*, int, tree_node*)
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:13213
0x6e9db8 tsubst(tree_node*, tree_node*, int, tree_node*)
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:12836
0x6fc6ea tsubst_template_args
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:11223
0x7011e4 tsubst_aggr_type
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:11420
0x6e9bd1 tsubst(tree_node*, tree_node*, int, tree_node*)
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:12889
0x6fe4ec lookup_template_class_1
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:8366
0x6fe4ec lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/pt.c:8638
0x811b9d finish_template_type(tree_node*, tree_node*, int)
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/semantics.c:3137
0x79d143 cp_parser_template_id
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/parser.c:14913
0x79d3fa cp_parser_class_name
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/parser.c:21210
0x78e6a1 cp_parser_qualifying_entity
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/parser.c:6238
0x78e6a1 cp_parser_nested_name_specifier_opt
/disk/0/erippey/gcc/b/objdir/../gcc/gcc/cp/parser.c:5924
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

This appears to be a regression.  The above code works on version 4.8.5 (though
it does require "--std=c++11" there).

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

--- Comment #9 from Andrew Pinski  ---
By the way the source does not compile as you did not include 'rnfprm.h'.

[Bug bootstrap/70896] gcc4 ABI compatible bootstrap fails

2016-05-23 Thread akihiko.odaki.4i at stu dot hosei.ac.jp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70896

Akihiko Odaki  changed:

   What|Removed |Added

 CC||akihiko.odaki.4i at stu dot 
hosei.
   ||ac.jp

--- Comment #7 from Akihiko Odaki  ---
I think __builtin_bswap* are fixed with this change.
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/gcc.target/arm/pr71056.c;h=136754eb13c4c4f8f840001d5520cf27f3c57461;hb=3f5ea43a1abdfa0acfdf58ff1159a6fe3e3c45c4

Without this change, arm_builtin_vectorized_function will override those
builtins with NEON specific ones, and causes an error with a new check which is
done before using the builtins:
https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=gcc/config/arm/arm-builtins.c;h=db6b29d310d57d7a7cb4b8f592e2f7e138606250;hp=835851f61f7f1175dd9fc4ddf409824b20219222;hb=86eff91f2fa7a69765d94bf4b8578c853c255193;hpb=f557f14d5380f613a41623d7f4c51986e33ba4f9

[Bug c/71249] -Wswitch-unreachable false positive for a compound statement containing a used label

2016-05-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71249

--- Comment #1 from Andrew Pinski  ---
The warning is correct that is i = 0; can never be executed.

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

--- Comment #8 from Andrew Pinski  ---
This code has the following warning:
!CRAY - The following multiply must be done with 64 bits (not 46 bits)
!   The algoritm depends on the overflow characteristics of
!   a 32 or 64 bit multiply.


So the code is implicitly saying it needs to be done using overflow as wrapping
for signed integer but in Fortran, overflow is undefined.

This is the code from genuni.

[Bug tree-optimization/71170] [7 Regression] ICE in rewrite_expr_tree, at tree-ssa-reassoc.c:3898

2016-05-23 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170

--- Comment #10 from kugan at gcc dot gnu.org ---
Author: kugan
Date: Tue May 24 00:14:13 2016
New Revision: 236619

URL: https://gcc.gnu.org/viewcvs?rev=236619&root=gcc&view=rev
Log:
gcc/ChangeLog:

2016-05-24  Kugan Vivekanandarajah  

PR middle-end/71170
* tree-ssa-reassoc.c (struct operand_entry): Add field stmt_to_insert.
(add_to_ops_vec): Add stmt_to_insert.
(add_repeat_to_ops_vec): Init stmt_to_insert.
(insert_stmt_before_use): New.
(transform_add_to_multiply): Remove mult_stmt insertion and add it to
ops vector.
(get_ops): Init stmt_to_insert.
(maybe_optimize_range_tests): Likewise.
(rewrite_expr_tree): Insert stmt_to_insert before use stmt.
(rewrite_expr_tree_parallel): Likewise.
(reassociate_bb): Likewise.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-reassoc.c

[Bug target/71201] PowerPC XXPERM instruction fails on ISA 3.0 system.

2016-05-23 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71201

--- Comment #3 from Michael Meissner  ---
Author: meissner
Date: Mon May 23 23:42:52 2016
New Revision: 236617

URL: https://gcc.gnu.org/viewcvs?rev=236617&root=gcc&view=rev
Log:
[gcc]
2016-05-23  Michael Meissner  

PR target/71201
* config/rs6000/altivec.md (altivec_vperm__internal): Drop
ISA 3.0 xxperm fusion alternative.
(altivec_vperm_v8hiv16qi): Likewise.
(altivec_vperm__uns_internal): Likewise.
(vperm_v8hiv4si): Likewise.
(vperm_v16qiv8hi): Likewise.

[gcc/testsuite]
2016-05-23  Michael Meissner  
Kelvin Nilsen  

* gcc.target/powerpc/p9-permute.c: Run test on big endian as well
as little endian.


[gcc]
2016-05-23  Michael Meissner  
Kelvin Nilsen  

* config/rs6000/rs6000.c (rs6000_expand_vector_set): Generate
vpermr/xxpermr on ISA 3.0.
(altivec_expand_vec_perm_le): Likewise.
* config/rs6000/altivec.md (UNSPEC_VPERMR): New unspec.
(altivec_vpermr__internal): Add VPERMR/XXPERMR support for
ISA 3.0.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/altivec.md
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/powerpc/p9-permute.c

[Bug other/71250] New: -Wmissing-field-initializers documentation is incomplete

2016-05-23 Thread vincent-gcc at vinc17 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71250

Bug ID: 71250
   Summary: -Wmissing-field-initializers documentation is
incomplete
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vincent-gcc at vinc17 dot net
  Target Milestone: ---

When doing some tests on structure initialization and trying to reproduce a
warning, I was wondering why on

  struct { int a, b; } x = { 0 };

a warning was not emitted with -Wmissing-field-initializers, and the gcc-6 man
page did not help:

  -Wmissing-field-initializers
  Warn if a structure's initializer has some fields missing.  For
  example, the following code causes such a warning, because "x.h" is
  implicitly zero:

  struct s { int f, g, h; };
  struct s x = { 3, 4 };

I eventually found bug 36750. So, the GCC documentation should be updated.

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

--- Comment #7 from Uroš Bizjak  ---
The difference in _optimized dumps is:

$ diff -u rnflow.f90.210t.optimized rnflow.f90.210t.optimized_
--- rnflow.f90.210t.optimized   2016-05-23 23:44:55.327695414 +0200
+++ rnflow.f90.210t.optimized_  2016-05-23 23:41:25.050960650 +0200
@@ -3525,8 +3525,8 @@
 :
   _238 = jgrm__lsm.1377_304 * 843314861;
   _239 = _238 + 453816693;
-  _240 = _239 & 2147483647;
-  _241 = (real(kind=4)) _240;
+  _240 = _239;
+  _241 = (real(kind=4)) _239;
   _242 = _241 * 4.656612873077392578125e-10;
   switch (isns_319) , case -1: , case 1: >

@@ -3543,7 +3543,7 @@
 goto ;

   :
-  jgrm = _240;
+  jgrm = _239;
   goto ;

   :
@@ -3631,7 +3631,7 @@
 goto ;

   :
-  jgrm = _240;
+  jgrm = _239;

   :
   __builtin_free (_150);


However, the masking operation should not be removed.

[Bug c/71249] New: -Wswitch-unreachable false positive for a compound statement containing a used label

2016-05-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71249

Bug ID: 71249
   Summary: -Wswitch-unreachable false positive for a compound
statement containing a used label
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

While reading the changes that implement the new -Wswitch-unreachable option
(bug 49859) I noticed that the hunk in gimplify_switch_exp assumes that only
GIMPLE_LABEL and LABEL_TRY statements are reachable.  The following test case
shows that this is an overly broad assumption, and that compound statements
containing labels used labels as their second or subsequent statements can also
be reachable.  As a result, GCC issues a false positive warning for the
following test case:

$ cat xxx.c && /build/gcc-trunk-svn/gcc/xgcc -B /build/gcc-trunk-svn/gcc -S
-Wall xxx.c
int g (int i)
{
  switch (i) {
  { i = 0; foo: return i; }
  case 3: goto foo;
  }
  return i;
}

xxx.c: In function ‘g’:
xxx.c:4:7: warning: statement will never be executed [-Wswitch-unreachable]
   { i = 0; foo: return i; }
 ~~^~~

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

--- Comment #6 from Uroš Bizjak  ---
Created attachment 38547
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38547&action=edit
rnflow source and data file

Compile with -Ofast to see the failure.

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

--- Comment #5 from Uroš Bizjak  ---
Actually, rnflow gets miscompiled, but scripts doesn't detect the failure.

Current mainline produces following results:

  0: 0:24.469 -> Compare results
  45 ,  53  38523934   2.0792
  45 ,  69  18051728   4.2698
  45 , 205  33793454   2.1684
  53 ,  61 10863   11000   1.2500
  53 , 181  31373049   2.8094
  61 ,  69 33011   33083  0.21999
  61 ,  77 32262   32419  0.47989
  61 ,  85 19449   19619  0.87005
  61 , 101  51295215   1.6498
  61 , 109  32873396   3.2104
...

whereas the right results are:

  0: 0:15.064 -> Compare results
  45 ,  69  18051873   3.6288
  53 ,  61 10863   10709   1.4196
  53 ,  69  94779552  0.78962
  53 , 189  51965278   1.5495
  61 ,  69 33011   32902  0.32983
  61 , 141  19601848   5.7104
  61 , 149  23412415   3.0594
  61 , 165  44104561   3.3094
  61 , 173  68236909   1.2401
  61 , 189 13230   13363   1.

Manually adding back missing AND in the resulting source:

.L333:
imull   $843314861, %ecx, %edx
pxor%xmm0, %xmm0
addl$453816693, %edx
andl$2147483647, %edx   <-- this instruction should be there!
cmpl$-1, %eax
cvtsi2ss%edx, %xmm0
movl%edx, %ecx
mulss   %xmm1, %xmm0
je  .L334
cmpl$1, %eax
jne .L333
cmpl%r10d, %r15d
jge .L336

gets back correct results.

[Bug c++/71248] New: crash on in-class initializer of array of pointer to member

2016-05-23 Thread programmerjake at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71248

Bug ID: 71248
   Summary: crash on in-class initializer of array of pointer to
member
   Product: gcc
   Version: 4.8.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: programmerjake at gmail dot com
  Target Milestone: ---

g++ --version
g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ -std=c++11 code.cpp
code.cpp:6:5: internal compiler error: Segmentation fault
 };
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Preprocessed source stored into /tmp/ccAlvGe3.out file, please attach this to
your bugreport.


code.cpp:
struct S
{
int a;
static int S::*typeMembers[] = {
&S::a,
};
};

[Bug fortran/71204] [5/6/7 Regression] ICE with -O0 in expand_expr_real_1, at expr.c:9651

2016-05-23 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71204

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||anlauf at gmx dot de

--- Comment #7 from kargl at gcc dot gnu.org ---
*** Bug 71247 has been marked as a duplicate of this bug. ***

[Bug fortran/71247] [6 Regression] ICE in expand_expr_real_1, at expr.c:9651

2016-05-23 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71247

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from kargl at gcc dot gnu.org ---
See pr71204.

*** This bug has been marked as a duplicate of bug 71204 ***

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

--- Comment #4 from Marc Glisse  ---
(In reply to Andrew Pinski from comment #3)
> Maybe a missing :s or this could be just increasing register pressure.

:s would have no effect, you would need to do it manually

 (simplify
  (bit_and SSA_NAME@0 INTEGER_CST@1)
  (if (INTEGRAL_TYPE_P (TREE_TYPE (@0))
+  && single_use (@0)
   && (get_nonzero_bits (@0) & wi::bit_not (@1)) == 0)
   @0))

but that seems wrong to me.

This is a transformation that only removes an operation, as far as I can tell
it shouldn't even increase register pressure... Maybe some other optimization
relies on the presence of & cst and could be improved to use get_nonzero_bits?
Someone with access to the source needs to see how the missing bit_and changes
the dumps after later passes.

[Bug fortran/71247] New: [6 Regression] ICE in expand_expr_real_1, at expr.c:9651

2016-05-23 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71247

Bug ID: 71247
   Summary: [6 Regression] ICE in expand_expr_real_1, at
expr.c:9651
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: anlauf at gmx dot de
  Target Milestone: ---

The following code ICEs with 6.0, but not with 5.0 or earlier.
The ICE disappears with -fno-realloc-lhs.

Don't know if it has been already been fixed after the initial 6 release.

% cat gfcbug135.f90 
MODULE gfcbug135
  implicit none
  integer, parameter  :: LEN=256
  character(len=LEN), allocatable :: lines(:)
  integer :: n
contains
  subroutine foo1 ()
integer :: i, j
j = n
do i = n, 1, -1
   lines(j) = lines(i)  ! Comment out to avoid ICE
   j = j - 1
end do
  end subroutine foo1
  !-
  subroutine foo2 ()
integer :: i,j
j = n + 3
do i = n,4,-1
   lines(j) = lines(i)  ! Comment out to avoid ICE
   j = j - 1
end do
  end subroutine foo2
end module gfcbug135


% gfortran6 -c gfcbug135.f90
gfcbug135.f90:11:0:

lines(j) = lines(i)  ! Comment out to avoid ICE

internal compiler error: in expand_expr_real_1, at expr.c:9651
0x8dafcb expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc-6-20160410/gcc/expr.c:9645
0x8efc4e expand_expr
../../gcc-6-20160410/gcc/expr.h:256
0x8efc4e expand_expr_addr_expr_1
../../gcc-6-20160410/gcc/expr.c:7672
0x8d71b6 expand_expr_addr_expr
../../gcc-6-20160410/gcc/expr.c:7793
0x8d71b6 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc-6-20160410/gcc/expr.c:10825
0x8e34a5 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
../../gcc-6-20160410/gcc/expr.c:5406
0x8e4e98 expand_assignment(tree_node*, tree_node*, bool)
../../gcc-6-20160410/gcc/expr.c:5175
0x7d899e expand_gimple_stmt_1
../../gcc-6-20160410/gcc/cfgexpand.c:3618
0x7d899e expand_gimple_stmt
../../gcc-6-20160410/gcc/cfgexpand.c:3714
0x7dae0e expand_gimple_basic_block
../../gcc-6-20160410/gcc/cfgexpand.c:5720
0x7e0f46 execute
../../gcc-6-20160410/gcc/cfgexpand.c:6335
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug c++/70584] constexpr variables cannot be used as intrinsic arguments where an immediate is expected

2016-05-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70584

--- Comment #6 from Jason Merrill  ---
Author: jason
Date: Mon May 23 21:21:24 2016
New Revision: 236616

URL: https://gcc.gnu.org/viewcvs?rev=236616&root=gcc&view=rev
Log:
PR c++/70584 - error with parenthesized builtin arg

* cp-gimplify.c (cp_fold) [INDIRECT_REF]: Call
maybe_undo_parenthesized_ref.

Added:
trunk/gcc/testsuite/g++.dg/other/i386-10.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c

[Bug c++/70735] [5/6/7 Regression] problem combining std::function, generic lambdas and static variables

2016-05-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70735

--- Comment #13 from Jason Merrill  ---
Author: jason
Date: Mon May 23 21:21:18 2016
New Revision: 236615

URL: https://gcc.gnu.org/viewcvs?rev=236615&root=gcc&view=rev
Log:
PR c++/70735 - generic lambda and local static variable

* pt.c (tsubst_copy): Just return a local variable from
non-template context.  Don't call rest_of_decl_compilation for
duplicated static locals.
(tsubst_decl): Set DECL_CONTEXT of local static from another
function.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/lambda-generic-static1.C
trunk/gcc/testsuite/g++.dg/cpp1y/lambda-generic-static2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

Uroš Bizjak  changed:

   What|Removed |Added

 CC||glisse at gcc dot gnu.org

--- Comment #2 from Uroš Bizjak  ---
(In reply to Richard Biener from comment #1)
> Confirmed.  Last time this was Honzas estimation changes, thus CCing Honza
> (aka, I told you so before).
> 
> 160517.34236301 ... 48.68 
> 160518.25236346 ... -1.00 
> 160519.34236434 ... 155.92
> 
> so unfortunately we have one broken run but the above "encodes" the revision
> range 236301 (good) to 236434 (bad).  The other tester constrais the revision
> range to 236299 (good) to 236427 (bad).
> 
> It might be the add-to-multiply reassoc which also applies to x + x,
> producing
> 2 * x which is eventually vectorized to comparatively very slow code (in case
> of integers).  There is a regression bug showing we need to fix this in
> vectorizer pattern recog.

Nope, this time reghunt points to r236338:

Log:
x & C -> x if we know that x & ~C == 0

2016-05-17  Marc Glisse  

gcc/
* match.pd (X & C): New transformation.

Reverting r236338, the -Ofast runtime on my x86_64-linux-gnu box goes from
0m24.650s to 0m15.037s.

[Bug regression/71231] [7 Regression]: 300% runtime increase for rnflow

2016-05-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71231

--- Comment #3 from Andrew Pinski  ---
(In reply to Uroš Bizjak from comment #2)
> Reverting r236338, the -Ofast runtime on my x86_64-linux-gnu box goes from
> 0m24.650s to 0m15.037s.

Maybe a missing :s or this could be just increasing register pressure.

[Bug c++/70972] [6 Regression] Inheriting constructors taking parameters by value should move them, not copy

2016-05-23 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70972

Paolo Carlini  changed:

   What|Removed |Added

Summary|[6/7 Regression] Inheriting |[6 Regression] Inheriting
   |constructors taking |constructors taking
   |parameters by value should  |parameters by value should
   |move them, not copy |move them, not copy

--- Comment #5 from Paolo Carlini  ---
Fixed in trunk so far.

[Bug c++/70972] [6/7 Regression] Inheriting constructors taking parameters by value should move them, not copy

2016-05-23 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70972

--- Comment #4 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Mon May 23 20:50:10 2016
New Revision: 236614

URL: https://gcc.gnu.org/viewcvs?rev=236614&root=gcc&view=rev
Log:
/cp
2016-05-23  Paolo Carlini  

PR c++/70972
* method.c (forward_parm): Use cp_build_reference_type.

/testsuite
2016-05-23  Paolo Carlini  

PR c++/70972
* g++.dg/cpp0x/inh-ctor20.C: New.
* g++.dg/cpp0x/inh-ctor21.C: Likewise.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor20.C
trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor21.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/method.c
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/71230] [7 Regression] ICE : in zero_one_operation, at tree-ssa-reassoc.c:1230

2016-05-23 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71230

Andreas Schwab  changed:

   What|Removed |Added

 CC||dcb314 at hotmail dot com

--- Comment #7 from Andreas Schwab  ---
*** Bug 71244 has been marked as a duplicate of this bug. ***

[Bug c++/71244] ice in zero_one_operation, at tree-ssa-reassoc.c:1230

2016-05-23 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71244

Andreas Schwab  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Andreas Schwab  ---
Should be fixed already.

*** This bug has been marked as a duplicate of bug 71230 ***

[Bug c++/69095] internal compiler error: in dependent_type_p, at cp/pt.c:19399

2016-05-23 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69095

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #5 from Paolo Carlini  ---
Fixed.

[Bug c++/69095] internal compiler error: in dependent_type_p, at cp/pt.c:19399

2016-05-23 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69095

--- Comment #4 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Mon May 23 19:24:22 2016
New Revision: 236610

URL: https://gcc.gnu.org/viewcvs?rev=236610&root=gcc&view=rev
Log:
/cp
2016-05-22  Paolo Carlini  

PR c++/69095
* parser.c (cp_parser_default_argument): Call
check_for_bare_parameter_packs.
(cp_parser_late_parsing_default_args): Likewise.

/testsuite
2016-05-22  Paolo Carlini  

PR c++/69095
* g++.dg/cpp0x/variadic168.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/variadic168.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog

[Bug inline-asm/71246] New: "+g" assembly constraint causes error: inconsistent operand constraints in an 'asm'

2016-05-23 Thread eric at efcs dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71246

Bug ID: 71246
   Summary: "+g" assembly constraint causes error: inconsistent
operand constraints in an 'asm'
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: inline-asm
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eric at efcs dot ca
  Target Milestone: ---

The following code fails to compile with the error "inconsistent operand
constraints in an 'asm'". It seems to also be triggered when the constrain is
stated as "+rm" which makes more sense.

Previous versions of GCC ICE'd on this code.

template 
inline __attribute__((__always_inline__)) 
void DoNotOptimize(Tp const& value) {
asm volatile("" : "+g" (const_cast(value)));
}

struct Foo {
  int Arr[42];
};

void test2() {
  Foo f = {};
  DoNotOptimize(f);
}

There are a couple of similar bugs but I'm not certain they are duplicates so
I'm filing this separately.

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

2016-05-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71240

--- Comment #5 from Jakub Jelinek  ---
To be precise, it should instead force it into a temporary SSA_NAME.

[Bug c++/70735] [5/6/7 Regression] problem combining std::function, generic lambdas and static variables

2016-05-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70735

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||jason at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

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

2016-05-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71240

--- Comment #4 from Jakub Jelinek  ---
For non-INTEGRAL_TYPE_P guess we need to first VIEW_CONVERT_EXPR it to
corresponding integral type.  Though, even that looks wrong.
src_stmt in this case is
_4 = BIT_FIELD_REF ;
and bswap_type and load_type are both unsigned int (SImode), while a_2(D) has
double type.  Even if a_2(D) would be some integral type, say long long, it
would do the wrong thing, it throws away the bitfield ref and corresponding
offset.
Wonder if we just shouldn't remove the
  else if (TREE_CODE (src) == BIT_FIELD_REF)
src = TREE_OPERAND (src, 0);
lines.

[Bug c++/71245] New: std::atomic load/store bounces the data to the stack using fild/fistp

2016-05-23 Thread peter at cordes dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71245

Bug ID: 71245
   Summary: std::atomic load/store bounces the data to the
stack using fild/fistp
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: peter at cordes dot ca
  Target Milestone: ---
Target: i386-linux-gnu

Same result with gcc 4.8, gcc5, and gcc6.1.  Didn't test exhaustively.

#include 

std::atomic d(5.0);
void foo_d(void) {
  d =  d + 1.0;
  // d+=1.0; // unimplemented
}

with gcc6.1 -m32 -O3 -march=i586 (https://godbolt.org/g/w3VKpG) this compiles
to

foo_d():
subl$20, %esp   #,
fildq   d ## 
fistpq  (%esp)  # %sfp # copy `d`'s bits to the stack (with no
loss)
fldl(%esp)  # %sfp
fadds   .LC0  #
fstpl   (%esp)# %sfp   # store d + 1.0 to the stack
fildq   (%esp)# %sfp   # 
fistpq  d   #  # atomic store using fild
lock orl$0, (%esp) ## mfence equivalent
addl$20, %esp   #,
ret

I assume fild/fistp is gcc's trick for implementing atomic loads and stores
without resorting to cmpxchg8b.  Clever, since 80bit float can't munge the
data.  The fild/fistp pairs are of course not necessary in this case, where the
data is already 64bit float.  The function should just fld / fstp to  d 
directly.

With -march=i486 or lower, gcc correctly doesn't assume that 64bit FP
loads/stores are atomic, so it calls a library function to do the atomic load
and store.  With SSE or SSE2 available, it uses an SSE load/store to copy to
the stack.  

With -msse2 and -mfpmath=sse, we finally load/store directly from/to d, with
movq / addsd / movq.  movq vs. movsd shouldn't make a performance difference, I
think.



We don't need to allocate any stack space.  We could implement the StoreLoad
barrier with  lock or $0, -4(%esp) instead of reserving extra stack to avoid
doing it to our return address (which would introduce extra store-forwarding
delay before the ret could eventually retire).

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

2016-05-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71240

--- Comment #3 from Jakub Jelinek  ---
Cleaned up testcase:
struct L { unsigned int l[2]; };
union U { double a; struct L l; } u;

void
foo (double a, struct L *p)
{
  u.a = a;
  struct L l = u.l, m;
  m.l[0] = 0;
  m.l[1] = (((l.l[0] & 0xff00) >> 24)
| ((l.l[0] & 0x00ff) >> 8)
| ((l.l[0] & 0xff00) << 8)
| ((l.l[0] & 0x00ff) << 24));
  *p = m;
}

void
bar (double a, struct L *p)
{
  foo (a, p);
}

[Bug c++/71244] New: ice in zero_one_operation, at tree-ssa-reassoc.c:1230

2016-05-23 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71244

Bug ID: 71244
   Summary: ice in zero_one_operation, at tree-ssa-reassoc.c:1230
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 38546
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38546&action=edit
gzipped C++ source code

The attached source code, when compiled by today's gcc trunk and
using flags -O2 -ffast-math, does this:

In file included from Lgamma.cc:24:0:
../include/Lgamma.h: In function ‘ttype cfrac_GAMMA(ttype, ttype, ttype, bool)
[with ttype = std::complex]’:
../include/Lgamma.h:337:7: internal compiler error: in zero_one_operation, at
tree-ssa-reassoc.c:1230
0xef6351 zero_one_operation
../../src/trunk/gcc/tree-ssa-reassoc.c:1229
0xefddd1 undistribute_ops_list
../../src/trunk/gcc/tree-ssa-reassoc.c:1583
0xefe9fc reassociate_bb
../../src/trunk/gcc/tree-ssa-reassoc.c:5199
0xefe657 reassociate_bb
../../src/trunk/gcc/tree-ssa-reassoc.c:5325

[Bug fortran/66461] [4.9/5/6/7 Regression] ICE on missing end program in fixed source

2016-05-23 Thread mikael at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66461

--- Comment #23 from Mikael Morin  ---
(In reply to Jerry DeLisle from comment #22)
> This patch, by itself, fixes the whole issue.
> 
Yes, it's OK to commit for me.

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

2016-05-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71240

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-05-23
 CC||jakub at gcc dot gnu.org
  Component|c++ |tree-optimization
   Target Milestone|--- |7.0
Summary|ICE on valid code at -O2|[7 Regression] ICE on valid
   |and above on|code at -O2 and above on
   |x86_64-linux-gnu:   |x86_64-linux-gnu:
   |verify_gimple failed|verify_gimple failed
 Ever confirmed|0   |1

--- Comment #2 from Jakub Jelinek  ---
Started with r236204.

[Bug ipa/71234] Conditional jump or move depends on uninitialised value in ipa_get_indirect_edge_target_1 (ipa-cp.c:2029)

2016-05-23 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71234

--- Comment #2 from Martin Jambor  ---
Author: jamborm
Date: Mon May 23 16:31:14 2016
New Revision: 236598

URL: https://gcc.gnu.org/viewcvs?rev=236598&root=gcc&view=rev
Log:
[PR 71234] Avoid valgrind warning in ipa-cp

2016-05-23  Martin Jambor  

PR ipa/71234
* ipa-cp.c (ipa_get_indirect_edge_target_1): Only check value of
from_global_constant if t is not NULL.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-cp.c

[Bug c++/71243] Implicitly defined assignment operator is not constexpr even though it should be

2016-05-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71243

--- Comment #1 from Jonathan Wakely  ---
The code is not valid in C++11, only C++14, and it seems that GCC 5 doesn't
implement the C++14 rules fully.

Since it's already fixed in GCC 6 I think this can be closed as FIXED.

[Bug c++/71243] New: Implicitly defined assignment operator is not constexpr even though it should be

2016-05-23 Thread michele.caini at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71243

Bug ID: 71243
   Summary: Implicitly defined assignment operator is not
constexpr even though it should be
   Product: gcc
   Version: 5.3.1
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: michele.caini at gmail dot com
  Target Milestone: ---

Explicitly defaulted constexpr assignment operator fails to compile.
See the minimal, failing example below:

struct S {
constexpr S& operator=(const S &) = default;
};

int main() { }

Tested on debian (Testing), g++ v5.3.1-19.
The same applies to g++ v5.3.0, while it works with g++ v6.1.0 (tested on
godbolt.org).

The error is:

2 : error: explicitly defaulted function 'constexpr S& S::operator=(const
S&)' cannot be declared as constexpr because the implicit declaration is not
constexpr:
constexpr S& operator=(const S &) = default;
^
Compilation failed

According to 12.8p26, it should compile for the one implicitly defined ought to
be constexpr too.

[Bug target/71242] New: [ia64] Missing built-in functions for float128 NaNs

2016-05-23 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71242

Bug ID: 71242
   Summary: [ia64] Missing built-in functions for float128 NaNs
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---
Target: ia64-*-*

On ia64, there are TFmode built-in functions __builtin_infq,
__builtin_huge_valq, __builtin_fabsq, __builtin_copysignq.  For use in glibc
tests when float128 functions are added to libm, there should also be functions
__builtin_nanq, __builtin_nansq (or maybe better __builtin_nanf128,
__builtin_nansf128, reflecting TS 18661-3 naming conventions), corresponding to
__builtin_nan and __builtin_nans.

(This is the ia64 version of bug 71241 for x86.)

[Bug target/71241] New: [x86] Missing built-in functions for float128 NaNs

2016-05-23 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71241

Bug ID: 71241
   Summary: [x86] Missing built-in functions for float128 NaNs
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---
Target: i?86-*-* x86_64-*-*

On x86, there are TFmode built-in functions __builtin_infq,
__builtin_huge_valq, __builtin_fabsq, __builtin_copysignq.  For use in glibc
tests when float128 functions are added to libm, there should also be functions
__builtin_nanq, __builtin_nansq (or maybe better __builtin_nanf128,
__builtin_nansf128, reflecting TS 18661-3 naming conventions), corresponding to
__builtin_nan and __builtin_nans.

[Bug c/49859] gcc could warn about statements between "switch" and first "case"

2016-05-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49859

--- Comment #9 from Marek Polacek  ---
Author: mpolacek
Date: Mon May 23 15:37:09 2016
New Revision: 236597

URL: https://gcc.gnu.org/viewcvs?rev=236597&root=gcc&view=rev
Log:
PR c/49859
* common.opt (Wswitch-unreachable): New option.
* doc/invoke.texi: Document -Wswitch-unreachable.
* gimplify.c (gimplify_switch_expr): Implement the -Wswitch-unreachable
warning.

* c-c++-common/Wswitch-unreachable-1.c: New test.
* gcc.dg/Wswitch-unreachable-1.c: New test.
* c-c++-common/goacc/sb-2.c (void foo): Add dg-warning.
* g++.dg/cpp0x/lambda/lambda-switch.C (main): Likewise.
* g++.dg/gomp/block-10.C: Likewise.
* gcc.dg/gomp/block-10.c: Likewise.
* g++.dg/gomp/block-9.C: Likewise.
* gcc.dg/gomp/block-9.c: Likewise.
* g++.dg/gomp/target-1.C: Likewise.
* g++.dg/gomp/target-2.C: Likewise.
* gcc.dg/gomp/target-1.c: Likewise.
* gcc.dg/gomp/target-2.c: Likewise. 
* g++.dg/gomp/taskgroup-1.C: Likewise.
* gcc.dg/gomp/taskgroup-1.c: Likewise.
* gcc.dg/gomp/teams-1.c: Likewise.
* g++.dg/gomp/teams-1.C: Likewise.
* g++.dg/overload/error3.C: Likewise.
* g++.dg/tm/jump1.C: Likewise.
* g++.dg/torture/pr40335.C: Likewise.
* gcc.dg/c99-vla-jump-5.c: Likewise.
* gcc.dg/switch-warn-1.c: Likewise.
* gcc.dg/Wjump-misses-init-1.c: Use -Wno-switch-unreachable.
* gcc.dg/nested-func-1.c: Likewise.
* gcc.dg/pr67784-4.c: Likewise.

Added:
trunk/gcc/testsuite/c-c++-common/Wswitch-unreachable-1.c
trunk/gcc/testsuite/gcc.dg/Wswitch-unreachable-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/common.opt
trunk/gcc/doc/invoke.texi
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/goacc/sb-2.c
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C
trunk/gcc/testsuite/g++.dg/gomp/block-10.C
trunk/gcc/testsuite/g++.dg/gomp/block-9.C
trunk/gcc/testsuite/g++.dg/gomp/target-1.C
trunk/gcc/testsuite/g++.dg/gomp/target-2.C
trunk/gcc/testsuite/g++.dg/gomp/taskgroup-1.C
trunk/gcc/testsuite/g++.dg/gomp/teams-1.C
trunk/gcc/testsuite/g++.dg/overload/error3.C
trunk/gcc/testsuite/g++.dg/tm/jump1.C
trunk/gcc/testsuite/g++.dg/torture/pr40335.C
trunk/gcc/testsuite/gcc.dg/Wjump-misses-init-1.c
trunk/gcc/testsuite/gcc.dg/c99-vla-jump-5.c
trunk/gcc/testsuite/gcc.dg/gomp/block-10.c
trunk/gcc/testsuite/gcc.dg/gomp/block-9.c
trunk/gcc/testsuite/gcc.dg/gomp/target-1.c
trunk/gcc/testsuite/gcc.dg/gomp/target-2.c
trunk/gcc/testsuite/gcc.dg/gomp/taskgroup-1.c
trunk/gcc/testsuite/gcc.dg/gomp/teams-1.c
trunk/gcc/testsuite/gcc.dg/nested-func-1.c
trunk/gcc/testsuite/gcc.dg/pr67784-4.c
trunk/gcc/testsuite/gcc.dg/switch-warn-1.c

[Bug c/49859] gcc could warn about statements between "switch" and first "case"

2016-05-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49859

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #10 from Marek Polacek  ---
Implemented for GCC 7.

[Bug c++/71240] ICE on valid code at -O2 and above on x86_64-linux-gnu: verify_gimple failed

2016-05-23 Thread rogero at howzatt dot demon.co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71240

--- Comment #1 from Roger Orr  ---
(The example code compiles with gcc revision 236175, dated 20160512)

[Bug c++/71240] New: ICE on valid code at -O2 and above on x86_64-linux-gnu: verify_gimple failed

2016-05-23 Thread rogero at howzatt dot demon.co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71240

Bug ID: 71240
   Summary: ICE on valid code at -O2 and above on
x86_64-linux-gnu: verify_gimple failed
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rogero at howzatt dot demon.co.uk
  Target Milestone: ---

Created attachment 38545
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38545&action=edit
Example code, fails with -O2

With gcc-trunk 236575 (which includes fixes for both these possibly related
PRs:
Bug 70641 - [5 Regression] ICE on valid code at -O1 and above on
x86_64-linux-gnu: verify_gimple failed
Bug 71079 - ICE on valid code at -O1 and above on x86_64-linux-gnu:
verify_gimple failed),
I am still getting an ICE for the attached code.

$ g++ -O2 verify_gimple.cxx

verify_gimple.cxx: In function 'void failure(double)':
verify_gimple.cxx:19:1: error: invalid types in nop conversion
 failure(double a)
 ^~~
unsigned int
double
bswapsrc_7 = (unsigned int) a_2(D);
verify_gimple.cxx:19:1: internal compiler error: verify_gimple failed
0xdc6d66 verify_gimple_in_cfg(function*, bool)
../../gcc/tree-cfg.c:5213
0xcbbbc3 execute_function_todo
../../gcc/passes.c:1964
0xcbc54b execute_todo
../../gcc/passes.c:2016
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/rorr/git/buildkit2/build/gcc/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/rorr/git/buildkit2/build/install
--enable-cloog-backend --enable-lto --enable-languages=c,c++
--enable-libstdcxx-time --enable-gold --enable-plugins --disable-multilib
--enable-werror=no --enable-libstdcxx-dual-abi
--with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 7.0.0 20160523 (experimental) (GCC)

[Bug libffi/65567] ERROR: tcl error sourcing /test/gnu/gcc/gcc/libffi/testsuite/libffi.complex/complex.exp

2016-05-23 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65567

--- Comment #5 from Thomas Schwinge  ---
Author: tschwinge
Date: Mon May 23 14:54:04 2016
New Revision: 236594

URL: https://gcc.gnu.org/viewcvs?rev=236594&root=gcc&view=rev
Log:
[PR libffi/65567] libffi: Fix, and simply libffi_feature_test

libffi/
PR libffi/65567
* testsuite/lib/libffi.exp (libffi_feature_test): Fix, and simply.

Modified:
trunk/libffi/ChangeLog
trunk/libffi/testsuite/lib/libffi.exp

[Bug libffi/65567] ERROR: tcl error sourcing /test/gnu/gcc/gcc/libffi/testsuite/libffi.complex/complex.exp

2016-05-23 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65567

--- Comment #6 from Thomas Schwinge  ---
Author: tschwinge
Date: Mon May 23 15:00:41 2016
New Revision: 236595

URL: https://gcc.gnu.org/viewcvs?rev=236595&root=gcc&view=rev
Log:
[PR libffi/65567] libffi: Fix, and simply libffi_feature_test

Backport trunk r236594:

libffi/
PR libffi/65567
* testsuite/lib/libffi.exp (libffi_feature_test): Fix, and simply.

Modified:
branches/gcc-6-branch/libffi/ChangeLog
branches/gcc-6-branch/libffi/testsuite/lib/libffi.exp

[Bug libffi/65567] ERROR: tcl error sourcing /test/gnu/gcc/gcc/libffi/testsuite/libffi.complex/complex.exp

2016-05-23 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65567

--- Comment #7 from Thomas Schwinge  ---
Author: tschwinge
Date: Mon May 23 15:03:08 2016
New Revision: 236596

URL: https://gcc.gnu.org/viewcvs?rev=236596&root=gcc&view=rev
Log:
[PR libffi/65567] libffi: Fix, and simply libffi_feature_test

Backport trunk r236594:

libffi/
PR libffi/65567
* testsuite/lib/libffi.exp (libffi_feature_test): Fix, and simply.

Modified:
branches/gcc-5-branch/libffi/ChangeLog
branches/gcc-5-branch/libffi/testsuite/lib/libffi.exp

[Bug tree-optimization/71239] [7 Regression] ICE in operand_equal_p (fold-const.c:2769)

2016-05-23 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71239

--- Comment #1 from Martin Liška  ---
Created attachment 38544
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38544&action=edit
Candidate patch

[Bug tree-optimization/71239] New: [7 Regression] ICE in operand_equal_p (fold-const.c:2769)

2016-05-23 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71239

Bug ID: 71239
   Summary: [7 Regression] ICE in operand_equal_p
(fold-const.c:2769)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Starting from r236557, we ICE on following code:

class A;
template  class B {
  A mArr[Length];

public:
  A &operator[](long aIndex) { return mArr[aIndex]; }
};
class A {
public:
  operator int *() {
int *a = mRawPtr;
return a;
  }
  int *mRawPtr;
};
extern B<0> b;
void fn1() {
  if (b[long(fn1)])
new int;
}

$/xgcc -B. tc.ii -Os -Wall -c


/home/marxin/BIG/buildbot/slave/source/firefox/obj-x86_64-pc-linux-gnu/netwerk/base/tc.ii:17:6:
internal compiler error: Segmentation fault
 void fn1() {
  ^~~
0x111b710 crash_signal
../../gcc/toplev.c:333
0xd349cc operand_equal_p(tree_node const*, tree_node const*, unsigned int)
../../gcc/fold-const.c:2769
0xd348f1 operand_equal_p(tree_node const*, tree_node const*, unsigned int)
../../gcc/fold-const.c:2751
0x14732ca array_at_struct_end_p(tree_node*)
../../gcc/tree.c:13100
0x14355c0 check_array_ref
../../gcc/tree-vrp.c:6427
0x1436190 check_array_bounds
../../gcc/tree-vrp.c:6589
0x146e089 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set >*))
../../gcc/tree.c:11650
0x146f6ae walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set >*))
../../gcc/tree.c:11967
0xdcd5d7 walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../gcc/gimple-walk.c:203
0x1436374 check_all_array_refs
../../gcc/tree-vrp.c:6636
0x1441378 vrp_finalize
../../gcc/tree-vrp.c:10202
0x14414c0 execute_vrp
../../gcc/tree-vrp.c:10295
0x14417bb execute
../../gcc/tree-vrp.c:10380

The problem is that we call operand_equal_p with one argument equal to NULL.

Martin

[Bug c++/71238] New: Undeclared function message imprecisely points to error column

2016-05-23 Thread b7.10110111 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71238

Bug ID: 71238
   Summary: Undeclared function message imprecisely points to
error column
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: b7.10110111 at gmail dot com
  Target Milestone: ---

The following program

int main()
{
int x=myFunc(3234);
}

gives me the error:

test.cpp:3:22: error: ‘myFunc’ was not declared in this scope
 int x=myFunc(3234);
  ^

Here the "^" symbol points to the closing parenthesis (and the parenthesis
itself is even colored red). But the error is not at that column, but rather at
`myFunc` identifier.

Similar code but without function call parentheses leads to much more precise
error message:

test.cpp:3:11: error: ‘myFunc’ was not declared in this scope
 int x=myFunc/*(3234)*/;
   ^~

[Bug target/70677] Suboptimal cond on AVR: unneeded stack frame

2016-05-23 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70677

--- Comment #3 from Georg-Johann Lay  ---
You can follow the bug reporting instructions an provide the preprocessed code
and the compiler output as described in https://gcc.gnu.org/bugs/#need

Just add -v -save-temps to the compiler's command line options, re-build the
project, and supply the output of the compiler and the generated *.i file (in
case of C) resp. *.ii file (in case of C++).

This is needed because you have to resolve the non-standard stuff like "INPUT"
or "Ardiuno.h".  There's no need that you change the suorces to accomplish this
(if you can manage to find a smalle test case, this is nice but not mandatory).

[Bug target/70676] suboptimal code generation on AVR

2016-05-23 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70676

--- Comment #3 from Georg-Johann Lay  ---
You can follow the bug reporting instructions an provide the preprocessed code
and the compiler output as described in https://gcc.gnu.org/bugs/#need

Just add -v -save-temps to the compiler's command line options, re-build the
project, and supply the output of the compiler and the generated *.i file (in
case of C) resp. *.ii file (in case of C++).

[Bug tree-optimization/71237] [7 regression] scev tests failing after pass reorganization

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71237

Richard Biener  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org
   Target Milestone|--- |7.0

[Bug tree-optimization/71230] [7 Regression] ICE : in zero_one_operation, at tree-ssa-reassoc.c:1230

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71230

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #6 from Richard Biener  ---
Fixed.

[Bug tree-optimization/71230] [7 Regression] ICE : in zero_one_operation, at tree-ssa-reassoc.c:1230

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71230

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Mon May 23 14:09:35 2016
New Revision: 236591

URL: https://gcc.gnu.org/viewcvs?rev=236591&root=gcc&view=rev
Log:
2016-05-23  Richard Biener  

PR tree-optimization/71230
* tree-ssa-reassoc.c (acceptable_pow_call): Move initial condition...
(try_special_add_to_ops): ... here.  Always test for single-use.

* gfortran.dg/pr71230-1.f90: New testcase.
* gfortran.dg/pr71230-2.f90: Likewise.

Added:
trunk/gcc/testsuite/gfortran.dg/pr71230-1.f90
trunk/gcc/testsuite/gfortran.dg/pr71230-2.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-reassoc.c

[Bug fortran/57284] [OOP] ICE with find_array_spec for polymorphic arrays

2016-05-23 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57284

--- Comment #6 from Dominique d'Humieres  ---
> Is there any progress concerning this bug? I'm trying GCC-5.3.

Usual answer: what did you do to fix it?

[Bug testsuite/52563] FAIL: gcc.dg/tree-ssa/scev-[3,4].c scan-tree-dump-times optimized "&a" 1

2016-05-23 Thread andre.simoesdiasvieira at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563

--- Comment #19 from Andre Vieira  ---
> First of all please open a new bug for the FAILs.  Second, the fix will
> be mostly adjusting the testcase expectations (eventually disabling LIM
> for example if we want to test SCCP abilities).

Opened a new ticket for this PR71237, makes sense to continue the discussions
there. I also quoted your comment there.

[Bug tree-optimization/71237] New: scev tests failing after pass reorganization

2016-05-23 Thread andre.simoesdiasvieira at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71237

Bug ID: 71237
   Summary: scev tests failing after pass reorganization
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: andre.simoesdiasvieira at arm dot com
  Target Milestone: ---

Ever since the reorganization of the passes moving lim before sink makes these
tests fail.

FAIL: gcc.dg/tree-ssa/scev-3.c scan-tree-dump-times optimized "&a" 1
FAIL: gcc.dg/tree-ssa/scev-4.c scan-tree-dump-times optimized "&a" 1
FAIL: gcc.dg/tree-ssa/scev-5.c scan-tree-dump-times optimized "&a" 1

This was first reported in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563#c11
for sparc*-*-solaris2.*, it also fails on arm-none-eabi.

Some further discussions on that thread.

Quoting Richard:

rguent...@suse.de 2016-05-23 07:40:31 UTC

>On Fri, 20 May 2016, andre.simoesdiasvieira at arm dot com wrote:
> 
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563
>> 
>> --- Comment #17 from Andre Vieira  ---
>> Ah yes my bad, its not sccp doing it... got a bit confused there... It is
>> indeed sink that moves that sequence down. Sorry for the noise.
>> 
>> Question remains on how to clean this up though. Ideally you would like to 
>> >end
>> up with
>> 
>> a_p = ;
>> outside of the loop.
> 
>First of all please open a new bug for the FAILs.  Second, the fix will
>be mostly adjusting the testcase expectations (eventually disabling LIM
>for example if we want to test SCCP abilities).
> 
>As to your question it techincally is a job of CSE though it may be a
>tough job to make it figure out the equivalence.
> 
>Now, in the case of scev-5.c (the only regression I see on x86_64, with
>-m32), SCCP fails to do final value replacement for i_24:
> 
>  :
>  # i_12 = PHI 
>  MEM[(int *)&a][i_12] = 100;
>  i_9 = i_5 + i_12;
>  if (i_9 <= 999)
>goto ;
>  else
>goto ;
> 
>  :
>  goto ;
> 
>  :
>  # i_24 = PHI 
>  _2 = (sizetype) i_24;
>  _3 = _2 * 4;
>  _1 = &a + _3;
>  a_p = _1;
> 
>which may or may not be a good thing - this way IVOPTs can see the
>extra use of i_12 on the loop exit and it _could_ look for derived
>uses of that so it _may_ be able to replace the use of i_24 with
>something better.

[Bug fortran/57284] [OOP] ICE with find_array_spec for polymorphic arrays

2016-05-23 Thread holysword at inbox dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57284

Benedict  changed:

   What|Removed |Added

 CC||holysword at inbox dot com

--- Comment #5 from Benedict  ---
Is there any progress concerning this bug? I'm trying GCC-5.3.

Please, notice that this also happens when the said class is a polymorphic
class (that is, the CLASS(*) declaration).

This particular bug renders gfortran practically unusable for my application.

[Bug target/69634] [4.9 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fschedule-insns -fno-tree-vrp @ i686

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69634

Richard Biener  changed:

   What|Removed |Added

   Priority|P1  |P2
  Known to work||5.4.0, 6.1.0
Summary|[4.9/5 Regression]  |[4.9 Regression]
   |-fcompare-debug failure |-fcompare-debug failure
   |(length) with -O2 -fno-dce  |(length) with -O2 -fno-dce
   |-fschedule-insns|-fschedule-insns
   |-fno-tree-vrp @ i686|-fno-tree-vrp @ i686
  Known to fail|6.0 |

[Bug target/69634] [4.9/5 Regression] -fcompare-debug failure (length) with -O2 -fno-dce -fschedule-insns -fno-tree-vrp @ i686

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69634

--- Comment #9 from Richard Biener  ---
Author: rguenth
Date: Mon May 23 12:51:29 2016
New Revision: 236588

URL: https://gcc.gnu.org/viewcvs?rev=236588&root=gcc&view=rev
Log:
2016-05-23  Richard Biener  

Backport from mainline
2016-02-11  Alexandre Oliva  

PR target/69634
* regstat.c (regstat_bb_compute_calls_crossed): Disregard
debug insns.

* gcc.dg/pr69634.c: New.

2016-03-23  Patrick Palka  

PR c++/70347
* typeck.c (process_init_constructor_union): If the initializer
is empty, use the union's NSDMI if it has one.

* g++.dg/cpp1y/nsdmi-union1.C: New test.

2015-10-30  Richard Biener  

PR middle-end/68142
* fold-const.c (extract_muldiv_1): Avoid introducing undefined
overflow.

* c-c++-common/ubsan/pr68142.c: New testcase.

2016-03-24  Richard Henderson  

PR middle-end/69845
* fold-const.c (extract_muldiv_1): Correct test for multiplication
overflow.

* gcc.dg/tree-ssa/pr69845-1.c: New test.
* gcc.dg/tree-ssa/pr69845-2.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/c-c++-common/ubsan/pr68142.c
branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/nsdmi-union1.C
branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr69634.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/tree-ssa/pr69845-1.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/tree-ssa/pr69845-2.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/typeck2.c
branches/gcc-5-branch/gcc/fold-const.c
branches/gcc-5-branch/gcc/regstat.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug middle-end/69845] [4.9 Regression] Expression getting incorrectly optimized after being rewritten by compiler

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69845

--- Comment #9 from Richard Biener  ---
Author: rguenth
Date: Mon May 23 12:51:29 2016
New Revision: 236588

URL: https://gcc.gnu.org/viewcvs?rev=236588&root=gcc&view=rev
Log:
2016-05-23  Richard Biener  

Backport from mainline
2016-02-11  Alexandre Oliva  

PR target/69634
* regstat.c (regstat_bb_compute_calls_crossed): Disregard
debug insns.

* gcc.dg/pr69634.c: New.

2016-03-23  Patrick Palka  

PR c++/70347
* typeck.c (process_init_constructor_union): If the initializer
is empty, use the union's NSDMI if it has one.

* g++.dg/cpp1y/nsdmi-union1.C: New test.

2015-10-30  Richard Biener  

PR middle-end/68142
* fold-const.c (extract_muldiv_1): Avoid introducing undefined
overflow.

* c-c++-common/ubsan/pr68142.c: New testcase.

2016-03-24  Richard Henderson  

PR middle-end/69845
* fold-const.c (extract_muldiv_1): Correct test for multiplication
overflow.

* gcc.dg/tree-ssa/pr69845-1.c: New test.
* gcc.dg/tree-ssa/pr69845-2.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/c-c++-common/ubsan/pr68142.c
branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/nsdmi-union1.C
branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr69634.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/tree-ssa/pr69845-1.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/tree-ssa/pr69845-2.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/typeck2.c
branches/gcc-5-branch/gcc/fold-const.c
branches/gcc-5-branch/gcc/regstat.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug c++/70347] [5 Regression] default member initializer not picked up by union

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70347

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||5.4.0
 Resolution|--- |FIXED

--- Comment #7 from Richard Biener  ---
Fixed.

[Bug c++/70347] [5 Regression] default member initializer not picked up by union

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70347

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Mon May 23 12:51:29 2016
New Revision: 236588

URL: https://gcc.gnu.org/viewcvs?rev=236588&root=gcc&view=rev
Log:
2016-05-23  Richard Biener  

Backport from mainline
2016-02-11  Alexandre Oliva  

PR target/69634
* regstat.c (regstat_bb_compute_calls_crossed): Disregard
debug insns.

* gcc.dg/pr69634.c: New.

2016-03-23  Patrick Palka  

PR c++/70347
* typeck.c (process_init_constructor_union): If the initializer
is empty, use the union's NSDMI if it has one.

* g++.dg/cpp1y/nsdmi-union1.C: New test.

2015-10-30  Richard Biener  

PR middle-end/68142
* fold-const.c (extract_muldiv_1): Avoid introducing undefined
overflow.

* c-c++-common/ubsan/pr68142.c: New testcase.

2016-03-24  Richard Henderson  

PR middle-end/69845
* fold-const.c (extract_muldiv_1): Correct test for multiplication
overflow.

* gcc.dg/tree-ssa/pr69845-1.c: New test.
* gcc.dg/tree-ssa/pr69845-2.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/c-c++-common/ubsan/pr68142.c
branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/nsdmi-union1.C
branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr69634.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/tree-ssa/pr69845-1.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/tree-ssa/pr69845-2.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/typeck2.c
branches/gcc-5-branch/gcc/fold-const.c
branches/gcc-5-branch/gcc/regstat.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug middle-end/68142] unsafe association of multiplication

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68142

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Mon May 23 12:51:29 2016
New Revision: 236588

URL: https://gcc.gnu.org/viewcvs?rev=236588&root=gcc&view=rev
Log:
2016-05-23  Richard Biener  

Backport from mainline
2016-02-11  Alexandre Oliva  

PR target/69634
* regstat.c (regstat_bb_compute_calls_crossed): Disregard
debug insns.

* gcc.dg/pr69634.c: New.

2016-03-23  Patrick Palka  

PR c++/70347
* typeck.c (process_init_constructor_union): If the initializer
is empty, use the union's NSDMI if it has one.

* g++.dg/cpp1y/nsdmi-union1.C: New test.

2015-10-30  Richard Biener  

PR middle-end/68142
* fold-const.c (extract_muldiv_1): Avoid introducing undefined
overflow.

* c-c++-common/ubsan/pr68142.c: New testcase.

2016-03-24  Richard Henderson  

PR middle-end/69845
* fold-const.c (extract_muldiv_1): Correct test for multiplication
overflow.

* gcc.dg/tree-ssa/pr69845-1.c: New test.
* gcc.dg/tree-ssa/pr69845-2.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/c-c++-common/ubsan/pr68142.c
branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp1y/nsdmi-union1.C
branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr69634.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/tree-ssa/pr69845-1.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/tree-ssa/pr69845-2.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/typeck2.c
branches/gcc-5-branch/gcc/fold-const.c
branches/gcc-5-branch/gcc/regstat.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug c++/71227] [6/7 Regression] template friend function cannot be resolved

2016-05-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71227

Jonathan Wakely  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #1 from Jonathan Wakely  ---
Started failing with r227044

[Bug c++/70972] [6/7 Regression] Inheriting constructors taking parameters by value should move them, not copy

2016-05-23 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70972

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-05-23
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com
 Ever confirmed|0   |1

--- Comment #3 from Paolo Carlini  ---
Looking into it.

[Bug c++/71236] [5/6/7 Regression] ICE on invalid code

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71236

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
   Target Milestone|--- |5.4

[Bug ipa/71190] [7 Regression] ICE in assemble_variable_contents, at varasm.c:2054

2016-05-23 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71190

Martin Jambor  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #1 from Martin Jambor  ---
When we briefly talked about this with Honza on Friday, he had quite a
few relevant and important insights, followed up by questions on IRC
which however seem to be lost.  Honza, can you please ask them here?

[Bug c++/71227] [6/7 Regression] template friend function cannot be resolved

2016-05-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71227

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-05-23
 Ever confirmed|0   |1

[Bug tree-optimization/70919] [6/7 Regression] wrong code at -O1 on x86_64-linux-gnu in 32-bit mode

2016-05-23 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70919
Bug 70919 depends on bug 70884, which changed state.

Bug 70884 Summary: [6 regression] 2nd SRA pass confused by load from constant 
pool
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70884

   What|Removed |Added

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

[Bug tree-optimization/70884] [6 regression] 2nd SRA pass confused by load from constant pool

2016-05-23 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70884

Martin Jambor  changed:

   What|Removed |Added

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

--- Comment #10 from Martin Jambor  ---
Fixed even on the branch now.

[Bug tree-optimization/70884] [6 regression] 2nd SRA pass confused by load from constant pool

2016-05-23 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70884

--- Comment #9 from Martin Jambor  ---
Author: jamborm
Date: Mon May 23 11:27:14 2016
New Revision: 236584

URL: https://gcc.gnu.org/viewcvs?rev=236584&root=gcc&view=rev
Log:
[PR 70884] Constant pool SRA fix

2016-05-23  Martin Jambor  

PR tree-optimization/70884
* tree-sra.c (initialize_constant_pool_replacements): Do not check
should_scalarize_away_bitmap and cannot_scalarize_away_bitmap bits.
(sort_and_splice_var_accesses): Do not consider multiple scalar reads
of constant pool data as a reason for scalarization.

testsuite/
* gcc.dg/tree-ssa/pr70919.c: New test.


Added:
branches/gcc-6-branch/gcc/testsuite/gcc.dg/tree-ssa/pr70919.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/tree-sra.c

[Bug c++/71236] New: [5/6/7 Regression] ICE on invalid code

2016-05-23 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71236

Bug ID: 71236
   Summary: [5/6/7 Regression] ICE on invalid code
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Hello.

Following snippet produces stack-overflow in:
#0  0x0055c39c in push_inner_scope_r (outer=0x769dd8e8, 
outer@entry=, inner=0x7688b000)
at ../../gcc/cp/name-lookup.c:2848

$ cat tc.ii
struct T
{
};

class A {
  template  struct COMTypeInfo;
};

namespace
{
  class B : A {};
  template  struct B::COMTypeInfo {}
}

$ g++ tc.ii
g++: internal compiler error: Segmentation fault (program cc1plus)

Martin

[Bug target/71235] New: march=silvermont turns on aes by default

2016-05-23 Thread tjoener at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71235

Bug ID: 71235
   Summary: march=silvermont turns on aes by default
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tjoener at gmail dot com
  Target Milestone: ---

march=silvermont automatically enables -maes, but not all silvermonts have aes
support. Avoton has it, but Bay Trail-D does not.

Eg: http://ark.intel.com/products/78867

The documentation does not make this clear, as it states the silvermont option
is for silvermont CPUs with aes support. Disabling this manually is no trouble.
Just wondering if it shouldn't be the least common denominator, ie silvermonts
without aes.

Maybe there should be a differentiation on silvermont with aes and silvermont
without aes?

[Bug target/71233] [ARM] missing AdvSIMD poly64 intrinsics

2016-05-23 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71233

--- Comment #2 from Christophe Lyon  ---
You are right, sorry for not double-checking the list provided by James:
https://gcc.gnu.org/ml/gcc-patches/2016-05/msg01014.html

[Bug target/70123] [5 Regression] Miscompilation of cfitsio testcase on s390x-linux starting with r222144

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70123

--- Comment #9 from Richard Biener  ---
(In reply to Bernd Schmidt from comment #8)
> I'll take your comment as approval and install on gcc-5 as well.

Ping?

[Bug target/71233] [ARM] missing AdvSIMD poly64 intrinsics

2016-05-23 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71233

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-05-23
 CC||ktkachov at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed, but I see vtst_p64 implemented in the arm_neon.h for arm

[Bug ipa/69239] [5 Regression] g++.dg/ipa/devirt-c-3.C FAILs with -O2 -fPIC --param=early-inlining-insns=196

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69239

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||5.4.0
 Resolution|--- |FIXED

--- Comment #8 from Richard Biener  ---
Fixed.

[Bug target/69252] [4.9/5 Regression] gcc.dg/vect/vect-iv-9.c FAILs with -Os -fmodulo-sched -fmodulo-sched-allow-regmoves -fsched-pressure

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69252

--- Comment #16 from Richard Biener  ---
Author: rguenth
Date: Mon May 23 10:41:35 2016
New Revision: 236583

URL: https://gcc.gnu.org/viewcvs?rev=236583&root=gcc&view=rev
Log:
2016-05-23  Richard Biener  

Backport from mainline
2015-12-11  Segher Boessenkool  

PR rtl-optimization/68814
* rtlanal.c (set_noop_p): Use BITS_BIG_ENDIAN instead of
BYTES_BIG_ENDIAN.

2016-01-12  Jan Hubicka  

PR lto/69003
* lto-partition.c (rename_statics): Fix pasto.

2016-01-13  Jan Hubicka  

PR ipa/66487
* ipa-polymorphic-call.c (inlined_polymorphic_ctor_dtor_block_p):
use block_ultimate_origin
(noncall-stmt_may_be_vtbl_ptr_store): Likewise.

2016-02-08  Jakub Jelinek  

PR ipa/69239
* g++.dg/ipa/pr69239.C: New test.

2016-01-21  Roman Zhuykov  

PR target/69252
* modulo-sched.c (optimize_sc): Allow branch-scheduling to add a new
first stage.

2016-01-21  Martin Sebor  

PR target/69252
* gcc.target/powerpc/pr69252.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/ipa/pr69239.C
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr69166.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/pr69252.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/ipa-polymorphic-call.c
branches/gcc-5-branch/gcc/lto/lto-partition.c
branches/gcc-5-branch/gcc/modulo-sched.c
branches/gcc-5-branch/gcc/rtlanal.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

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

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66487

--- Comment #22 from Richard Biener  ---
Author: rguenth
Date: Mon May 23 10:41:35 2016
New Revision: 236583

URL: https://gcc.gnu.org/viewcvs?rev=236583&root=gcc&view=rev
Log:
2016-05-23  Richard Biener  

Backport from mainline
2015-12-11  Segher Boessenkool  

PR rtl-optimization/68814
* rtlanal.c (set_noop_p): Use BITS_BIG_ENDIAN instead of
BYTES_BIG_ENDIAN.

2016-01-12  Jan Hubicka  

PR lto/69003
* lto-partition.c (rename_statics): Fix pasto.

2016-01-13  Jan Hubicka  

PR ipa/66487
* ipa-polymorphic-call.c (inlined_polymorphic_ctor_dtor_block_p):
use block_ultimate_origin
(noncall-stmt_may_be_vtbl_ptr_store): Likewise.

2016-02-08  Jakub Jelinek  

PR ipa/69239
* g++.dg/ipa/pr69239.C: New test.

2016-01-21  Roman Zhuykov  

PR target/69252
* modulo-sched.c (optimize_sc): Allow branch-scheduling to add a new
first stage.

2016-01-21  Martin Sebor  

PR target/69252
* gcc.target/powerpc/pr69252.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/ipa/pr69239.C
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr69166.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/pr69252.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/ipa-polymorphic-call.c
branches/gcc-5-branch/gcc/lto/lto-partition.c
branches/gcc-5-branch/gcc/modulo-sched.c
branches/gcc-5-branch/gcc/rtlanal.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/68814] [4.9 regression] gcc.dg/pr63594-2.c fails since r226005

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68814

Richard Biener  changed:

   What|Removed |Added

  Known to work||5.4.0, 6.1.0
Summary|[4.9/5 regression]  |[4.9 regression]
   |gcc.dg/pr63594-2.c fails|gcc.dg/pr63594-2.c fails
   |since r226005   |since r226005

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Mon May 23 10:41:35 2016
New Revision: 236583

URL: https://gcc.gnu.org/viewcvs?rev=236583&root=gcc&view=rev
Log:
2016-05-23  Richard Biener  

Backport from mainline
2015-12-11  Segher Boessenkool  

PR rtl-optimization/68814
* rtlanal.c (set_noop_p): Use BITS_BIG_ENDIAN instead of
BYTES_BIG_ENDIAN.

2016-01-12  Jan Hubicka  

PR lto/69003
* lto-partition.c (rename_statics): Fix pasto.

2016-01-13  Jan Hubicka  

PR ipa/66487
* ipa-polymorphic-call.c (inlined_polymorphic_ctor_dtor_block_p):
use block_ultimate_origin
(noncall-stmt_may_be_vtbl_ptr_store): Likewise.

2016-02-08  Jakub Jelinek  

PR ipa/69239
* g++.dg/ipa/pr69239.C: New test.

2016-01-21  Roman Zhuykov  

PR target/69252
* modulo-sched.c (optimize_sc): Allow branch-scheduling to add a new
first stage.

2016-01-21  Martin Sebor  

PR target/69252
* gcc.target/powerpc/pr69252.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/ipa/pr69239.C
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr69166.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/pr69252.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/ipa-polymorphic-call.c
branches/gcc-5-branch/gcc/lto/lto-partition.c
branches/gcc-5-branch/gcc/modulo-sched.c
branches/gcc-5-branch/gcc/rtlanal.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/68814] [4.9 regression] gcc.dg/pr63594-2.c fails since r226005

2016-05-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68814

Richard Biener  changed:

   What|Removed |Added

  Known to work||5.4.0, 6.1.0
Summary|[4.9/5 regression]  |[4.9 regression]
   |gcc.dg/pr63594-2.c fails|gcc.dg/pr63594-2.c fails
   |since r226005   |since r226005

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Mon May 23 10:41:35 2016
New Revision: 236583

URL: https://gcc.gnu.org/viewcvs?rev=236583&root=gcc&view=rev
Log:
2016-05-23  Richard Biener  

Backport from mainline
2015-12-11  Segher Boessenkool  

PR rtl-optimization/68814
* rtlanal.c (set_noop_p): Use BITS_BIG_ENDIAN instead of
BYTES_BIG_ENDIAN.

2016-01-12  Jan Hubicka  

PR lto/69003
* lto-partition.c (rename_statics): Fix pasto.

2016-01-13  Jan Hubicka  

PR ipa/66487
* ipa-polymorphic-call.c (inlined_polymorphic_ctor_dtor_block_p):
use block_ultimate_origin
(noncall-stmt_may_be_vtbl_ptr_store): Likewise.

2016-02-08  Jakub Jelinek  

PR ipa/69239
* g++.dg/ipa/pr69239.C: New test.

2016-01-21  Roman Zhuykov  

PR target/69252
* modulo-sched.c (optimize_sc): Allow branch-scheduling to add a new
first stage.

2016-01-21  Martin Sebor  

PR target/69252
* gcc.target/powerpc/pr69252.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/ipa/pr69239.C
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr69166.c
branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/pr69252.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/ipa-polymorphic-call.c
branches/gcc-5-branch/gcc/lto/lto-partition.c
branches/gcc-5-branch/gcc/modulo-sched.c
branches/gcc-5-branch/gcc/rtlanal.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

  1   2   >