[gcc-6] 170/401: * Update to SVN 20160630 (r237878, 6.1.1) from the gcc-6-branch.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:48:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.

commit 6c53a347f738124fa52365ffc76b4a7e0517b494
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Thu Jun 30 12:19:13 2016 +0000

      * Update to SVN 20160630 (r237878, 6.1.1) from the gcc-6-branch.
    
    
    git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8904 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                |   6 +-
 debian/patches/svn-updates.diff | 486 ++++++++++++++++++++++++++++++++++++++--
 2 files changed, 476 insertions(+), 16 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index eaa8460..123ed77 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
 gcc-6 (6.1.1-8) UNRELEASED; urgency=medium
 
-  * Update to SVN 20160629 (r237851, 6.1.1) from the gcc-6-branch.
+  * Update to SVN 20160630 (r237878, 6.1.1) from the gcc-6-branch.
     - Fix PR tree-optimization/71647, PR target/30417 (AVR),
       PR target/71103 (AVR), PR tree-optimization/71588, PR middle-end/71581,
-      PR c++/71528, PR fortran/70673.
+      PR c++/71528, PR fortran/70673, PR middle-end/71693.
 
   [ Aurelien Jarno ]
   * Apply proposed patch from Matthew Fortune to fix libjava on mips64el.
@@ -14,7 +14,7 @@ gcc-6 (6.1.1-8) UNRELEASED; urgency=medium
   * cpp: Breaks libmagics++-dev (<< 2.28.0-4). Closes: #825278.
   * Optimize for mips32r2 for o32 (YunQiang Su). Closes: #827801.
 
- -- Matthias Klose <doko at debian.org>  Wed, 29 Jun 2016 15:14:24 +0200
+ -- Matthias Klose <doko at debian.org>  Thu, 30 Jun 2016 14:12:55 +0200
 
 gcc-6 (6.1.1-7) unstable; urgency=medium
 
diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff
index 14a6519..b5e18c0 100644
--- a/debian/patches/svn-updates.diff
+++ b/debian/patches/svn-updates.diff
@@ -1,10 +1,10 @@
-# DP: updates from the 6 branch upto 20160629 (r237851).
+# DP: updates from the 6 branch upto 20160630 (r237878).
 
 last_update()
 {
 	cat > ${dir}LAST_UPDATED <EOF
-Wed Jun 29 15:12:54 CEST 2016
-Wed Jun 29 13:12:54 UTC 2016 (revision 237851)
+Thu Jun 30 14:07:58 CEST 2016
+Thu Jun 30 12:07:58 UTC 2016 (revision 237878)
 EOF
 }
 
@@ -5221,7 +5221,7 @@ Index: gcc/DATESTAMP
 +++ b/src/gcc/DATESTAMP	(.../branches/gcc-6-branch)
 @@ -1 +1 @@
 -20160427
-+20160629
++20160630
 Index: gcc/tree-ssa-strlen.c
 ===================================================================
 --- a/src/gcc/tree-ssa-strlen.c	(.../tags/gcc_6_1_0_release)
@@ -5603,7 +5603,37 @@ Index: gcc/fold-const.c
  		       || POINTER_TYPE_OVERFLOW_UNDEFINED))
  	    {
  	      /* By converting to signed sizetype we cover middle-end pointer
-@@ -11631,9 +11641,9 @@
+@@ -10514,11 +10524,15 @@
+ 	      || TREE_CODE (arg0) == BIT_IOR_EXPR
+ 	      || TREE_CODE (arg0) == BIT_XOR_EXPR)
+ 	  && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
+-	return fold_build2_loc (loc, TREE_CODE (arg0), type,
+-			    fold_build2_loc (loc, code, type,
+-					 TREE_OPERAND (arg0, 0), arg1),
+-			    fold_build2_loc (loc, code, type,
+-					 TREE_OPERAND (arg0, 1), arg1));
++	{
++	  tree arg00 = fold_convert_loc (loc, type, TREE_OPERAND (arg0, 0));
++	  tree arg01 = fold_convert_loc (loc, type, TREE_OPERAND (arg0, 1));
++	  return fold_build2_loc (loc, TREE_CODE (arg0), type,
++				  fold_build2_loc (loc, code, type,
++						   arg00, arg1),
++				  fold_build2_loc (loc, code, type,
++						   arg01, arg1));
++	}
+ 
+       /* Two consecutive rotates adding up to the some integer
+ 	 multiple of the precision of the type can be ignored.  */
+@@ -10527,7 +10541,7 @@
+ 	  && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
+ 	  && wi::umod_trunc (wi::add (arg1, TREE_OPERAND (arg0, 1)),
+ 			     prec) == 0)
+-	return TREE_OPERAND (arg0, 0);
++	return fold_convert_loc (loc, type, TREE_OPERAND (arg0, 0));
+ 
+       return NULL_TREE;
+ 
+@@ -11631,9 +11645,9 @@
        /* Convert A ? 0 : 1 to !A.  This prefers the use of NOT_EXPR
  	 over COND_EXPR in cases such as floating point comparisons.  */
        if (integer_zerop (op1)
@@ -5616,7 +5646,7 @@ Index: gcc/fold-const.c
  	  && truth_value_p (TREE_CODE (arg0)))
  	return pedantic_non_lvalue_loc (loc,
  				    fold_convert_loc (loc, type,
-@@ -12305,7 +12315,8 @@
+@@ -12305,7 +12319,8 @@
  	       || TYPE_REFERENCE_TO (expr)
  	       || TYPE_CACHED_VALUES_P (expr)
  	       || TYPE_CONTAINS_PLACEHOLDER_INTERNAL (expr)
@@ -5626,7 +5656,7 @@ Index: gcc/fold-const.c
      {
        /* Allow these fields to be modified.  */
        tree tmp;
-@@ -12315,6 +12326,7 @@
+@@ -12315,6 +12330,7 @@
        TYPE_POINTER_TO (tmp) = NULL;
        TYPE_REFERENCE_TO (tmp) = NULL;
        TYPE_NEXT_VARIANT (tmp) = NULL;
@@ -5634,7 +5664,7 @@ Index: gcc/fold-const.c
        if (TYPE_CACHED_VALUES_P (tmp))
  	{
  	  TYPE_CACHED_VALUES_P (tmp) = 0;
-@@ -13549,6 +13561,9 @@
+@@ -13549,6 +13565,9 @@
  	if (!DECL_P (base))
  	  base = get_base_address (base);
  
@@ -5722,6 +5752,18 @@ Index: gcc/omp-low.c
    struct function *kern_cfun = DECL_STRUCT_FUNCTION (kern_fndecl);
    kern_cfun->curr_properties = cfun->curr_properties;
  
+Index: gcc/ipa-inline-transform.c
+===================================================================
+--- a/src/gcc/ipa-inline-transform.c	(.../tags/gcc_6_1_0_release)
++++ b/src/gcc/ipa-inline-transform.c	(.../branches/gcc-6-branch)
+@@ -334,7 +334,6 @@
+       if (dump_file)
+ 	fprintf (dump_file, "Dropping flag_strict_aliasing on %s:%i\n",
+ 		 to->name (), to->order);
+-      build_optimization_node (&opts);
+       DECL_FUNCTION_SPECIFIC_OPTIMIZATION (to->decl)
+ 	 = build_optimization_node (&opts);
+     }
 Index: gcc/tree-ssa-sccvn.c
 ===================================================================
 --- a/src/gcc/tree-ssa-sccvn.c	(.../tags/gcc_6_1_0_release)
@@ -5753,7 +5795,30 @@ Index: gcc/ChangeLog
 ===================================================================
 --- a/src/gcc/ChangeLog	(.../tags/gcc_6_1_0_release)
 +++ b/src/gcc/ChangeLog	(.../branches/gcc-6-branch)
-@@ -1,3 +1,1311 @@
+@@ -1,3 +1,1334 @@
++2016-06-30  Jakub Jelinek  <jakub at redhat.com>
++
++	PR middle-end/71693
++	* fold-const.c (fold_binary_loc) <case RROTATE_EXPR>: Cast
++	TREE_OPERAND (arg0, 0) and TREE_OPERAND (arg0, 1) to type
++	first when permuting bitwise operation with rotate.  Cast
++	TREE_OPERAND (arg0, 0) to type when cancelling two rotations.
++
++2016-06-30  Martin Liska  <mliska at suse.cz>
++
++	Parting backport from mainline
++	2016-06-29  Martin Liska  <mliska at suse.cz>
++
++	* ipa-inline-transform.c (inline_call): Remove unnecessary call
++	of build_optimization_node.
++
++2016-06-29  Eric Botcazou  <ebotcazou at adacore.com>
++
++	Backport from mainline
++	2016-06-09  Eric Botcazou  <ebotcazou at adacore.com>
++
++	* df-problems.c (df_note_bb_compute): Guard use of DF_INSN_INFO_GET.
++
 +2016-06-27  Michael Meissner  <meissner at linux.vnet.ibm.com>
 +
 +	Back port from trunk
@@ -7065,7 +7130,7 @@ Index: gcc/ChangeLog
  2016-04-27  Release Manager
  
  	* GCC 6.1.0 released.
-@@ -49,7 +1357,7 @@
+@@ -49,7 +1380,7 @@
  	constant boolean.
  
  2016-04-20  Andrew Pinski  <apinski at cavium.com>
@@ -11249,6 +11314,114 @@ Index: gcc/testsuite/gfortran.dg/goacc/cray-2.f95
 +    !$acc update self (ptr)
 +  end subroutine oacc1
 +end program test
+Index: gcc/testsuite/gfortran.dg/goacc/asyncwait-2.f95
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/goacc/asyncwait-2.f95	(.../tags/gcc_6_1_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/goacc/asyncwait-2.f95	(.../branches/gcc-6-branch)
+@@ -83,6 +83,18 @@
+   end do
+   !$acc end parallel ! { dg-error "Unexpected \\\!\\\$ACC END PARALLEL" }
+ 
++  !$acc parallel copyin (a(1:N)) copy (b(1:N)) waitasync ! { dg-error "Unclassifiable OpenACC directive" }
++  do i = 1, N
++     b(i) = a(i)
++  end do
++  !$acc end parallel ! { dg-error "Unexpected \\\!\\\$ACC END PARALLEL" }
++
++  !$acc parallel copyin (a(1:N)) copy (b(1:N)) asyncwait ! { dg-error "Unclassifiable OpenACC directive" }
++  do i = 1, N
++     b(i) = a(i)
++  end do
++  !$acc end parallel ! { dg-error "Unexpected \\\!\\\$ACC END PARALLEL" }
++
+   !$acc parallel copyin (a(1:N)) copy (b(1:N)) wait
+   do i = 1, N
+      b(i) = a(i)
+Index: gcc/testsuite/gfortran.dg/goacc/asyncwait-3.f95
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/goacc/asyncwait-3.f95	(.../tags/gcc_6_1_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/goacc/asyncwait-3.f95	(.../branches/gcc-6-branch)
+@@ -11,17 +11,17 @@
+   a(:) = 3.0
+   b(:) = 0.0
+ 
+-  !$acc wait (1 2) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait (1 2) ! { dg-error "Syntax error in OpenACC expression list at" }
+ 
+-  !$acc wait (1,) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait (1,) ! { dg-error "Syntax error in OpenACC expression list at" }
+ 
+-  !$acc wait (,1) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait (,1) ! { dg-error "Syntax error in OpenACC expression list at" }
+ 
+-  !$acc wait (1, 2, ) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait (1, 2, ) ! { dg-error "Syntax error in OpenACC expression list at" }
+ 
+-  !$acc wait (1, 2, ,) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait (1, 2, ,) ! { dg-error "Syntax error in OpenACC expression list at" }
+ 
+-  !$acc wait (1 ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait (1 ! { dg-error "Syntax error in OpenACC expression list at" }
+ 
+   !$acc wait (1, *) ! { dg-error "Invalid argument to \\\$\\\!ACC WAIT" }
+ 
+@@ -33,9 +33,9 @@
+ 
+   !$acc wait (1.0) ! { dg-error "WAIT clause at \\\(1\\\) requires a scalar INTEGER expression" }
+ 
+-  !$acc wait 1 ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait 1 ! { dg-error "Unclassifiable OpenACC directive" }
+ 
+-  !$acc wait N ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait N ! { dg-error "Unclassifiable OpenACC directive" }
+ 
+   !$acc wait (1)
+ end program asyncwait
+Index: gcc/testsuite/gfortran.dg/goacc/asyncwait-4.f95
+===================================================================
+--- a/src/gcc/testsuite/gfortran.dg/goacc/asyncwait-4.f95	(.../tags/gcc_6_1_0_release)
++++ b/src/gcc/testsuite/gfortran.dg/goacc/asyncwait-4.f95	(.../branches/gcc-6-branch)
+@@ -11,21 +11,21 @@
+   a(:) = 3.0
+   b(:) = 0.0
+ 
+-  !$acc wait async (1 2) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait async (1 2) ! { dg-error "Unclassifiable OpenACC directive" }
+ 
+-  !$acc wait async (1,) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait async (1,) ! { dg-error "Unclassifiable OpenACC directive" }
+ 
+-  !$acc wait async (,1) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait async (,1) ! { dg-error "Invalid character in name" }
+ 
+-  !$acc wait async (1, 2, ) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait async (1, 2, ) ! { dg-error "Unclassifiable OpenACC directive" }
+ 
+-  !$acc wait async (1, 2, ,) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait async (1, 2, ,) ! { dg-error "Unclassifiable OpenACC directive" }
+ 
+-  !$acc wait async (1 ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait async (1 ! { dg-error "Unclassifiable OpenACC directive" }
+ 
+-  !$acc wait async (1, *) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait async (1, *) ! { dg-error "Unclassifiable OpenACC directive" }
+ 
+-  !$acc wait async (1, a) ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait async (1, a) ! { dg-error "Unclassifiable OpenACC directive" }
+ 
+   !$acc wait async (a) ! { dg-error "ASYNC clause at \\\(1\\\) requires a scalar INTEGER expression" }
+ 
+@@ -33,5 +33,9 @@
+ 
+   !$acc wait async (1.0) ! { dg-error "ASYNC clause at \\\(1\\\) requires a scalar INTEGER expression" }
+ 
+-  !$acc wait async 1 ! { dg-error "Unexpected junk in \\\!\\\$ACC WAIT at" }
++  !$acc wait async 1 ! { dg-error "Unclassifiable OpenACC directive" }
++
++  !$acc waitasync ! { dg-error "Unclassifiable OpenACC directive" }
++
++  !$acc wait,async ! { dg-error "Unclassifiable OpenACC directive" }
+ end program asyncwait
 Index: gcc/testsuite/gfortran.dg/goacc/nested-function-1.f90
 ===================================================================
 --- a/src/gcc/testsuite/gfortran.dg/goacc/nested-function-1.f90	(.../tags/gcc_6_1_0_release)
@@ -13291,6 +13464,21 @@ Index: gcc/testsuite/gcc.c-torture/execute/pr71554.c
 +    __builtin_abort ();
 +  return 0;
 +}
+Index: gcc/testsuite/gcc.c-torture/compile/pr71693.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.c-torture/compile/pr71693.c	(.../tags/gcc_6_1_0_release)
++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr71693.c	(.../branches/gcc-6-branch)
+@@ -0,0 +1,10 @@
++/* PR middle-end/71693 */
++
++unsigned short v;
++
++void
++foo (int x)
++{
++  v = ((((unsigned short) (0x0001 | (x & 0x0070) | 0x0100) & 0x00ffU) << 8)
++       | (((unsigned short) (0x0001 | (x & 0x0070) | 0x0100) >> 8) & 0x00ffU));
++}
 Index: gcc/testsuite/gcc.c-torture/compile/pr70916.c
 ===================================================================
 --- a/src/gcc/testsuite/gcc.c-torture/compile/pr70916.c	(.../tags/gcc_6_1_0_release)
@@ -14162,7 +14350,21 @@ Index: gcc/testsuite/ChangeLog
 ===================================================================
 --- a/src/gcc/testsuite/ChangeLog	(.../tags/gcc_6_1_0_release)
 +++ b/src/gcc/testsuite/ChangeLog	(.../branches/gcc-6-branch)
-@@ -1,3 +1,760 @@
+@@ -1,3 +1,774 @@
++2016-06-30  Jakub Jelinek  <jakub at redhat.com>
++
++	PR middle-end/71693
++	* gcc.c-torture/compile/pr71693.c: New test.
++
++2016-06-29  Cesar Philippidis  <cesar at codesourcery.com>
++
++	Back port from trunk
++	2016-06-29  Cesar Philippidis  <cesar at codesourcery.com>
++
++	* gfortran.dg/goacc/asyncwait-2.f95: Updated expected diagnostics.
++	* gfortran.dg/goacc/asyncwait-3.f95: Likewise.
++	* gfortran.dg/goacc/asyncwait-4.f95: Add test coverage.
++
 +2016-06-27  Paul Thomas  <pault at gcc.gnu.org>
 +
 +	PR fortran/70673
@@ -18623,7 +18825,229 @@ Index: gcc/fortran/openmp.c
 ===================================================================
 --- a/src/gcc/fortran/openmp.c	(.../tags/gcc_6_1_0_release)
 +++ b/src/gcc/fortran/openmp.c	(.../branches/gcc-6-branch)
-@@ -1623,6 +1623,10 @@
+@@ -396,7 +396,7 @@
+ }
+ 
+ static match
+-match_oacc_clause_gang (gfc_omp_clauses *cp)
++match_oacc_clause_gwv (gfc_omp_clauses *cp, unsigned gwv)
+ {
+   match ret = MATCH_YES;
+ 
+@@ -403,36 +403,60 @@
+   if (gfc_match (" ( ") != MATCH_YES)
+     return MATCH_NO;
+ 
+-  /* The gang clause accepts two optional arguments, num and static.
+-     The num argument may either be explicit (num: <val>) or
+-     implicit without (<val> without num:).  */
++  if (gwv == GOMP_DIM_GANG)
++    {
++        /* The gang clause accepts two optional arguments, num and static.
++	 The num argument may either be explicit (num: <val>) or
++	 implicit without (<val> without num:).  */
+ 
+-  while (ret == MATCH_YES)
+-    {
+-      if (gfc_match (" static :") == MATCH_YES)
++      while (ret == MATCH_YES)
+ 	{
+-	  if (cp->gang_static)
+-	    return MATCH_ERROR;
++	  if (gfc_match (" static :") == MATCH_YES)
++	    {
++	      if (cp->gang_static)
++		return MATCH_ERROR;
++	      else
++		cp->gang_static = true;
++	      if (gfc_match_char ('*') == MATCH_YES)
++		cp->gang_static_expr = NULL;
++	      else if (gfc_match (" %e ", &cp->gang_static_expr) != MATCH_YES)
++		return MATCH_ERROR;
++	    }
+ 	  else
+-	    cp->gang_static = true;
+-	  if (gfc_match_char ('*') == MATCH_YES)
+-	    cp->gang_static_expr = NULL;
+-	  else if (gfc_match (" %e ", &cp->gang_static_expr) != MATCH_YES)
+-	    return MATCH_ERROR;
++	    {
++	      if (cp->gang_num_expr)
++		return MATCH_ERROR;
++
++	      /* The 'num' argument is optional.  */
++	      gfc_match (" num :");
++
++	      if (gfc_match (" %e ", &cp->gang_num_expr) != MATCH_YES)
++		return MATCH_ERROR;
++	    }
++
++	  ret = gfc_match (" , ");
+ 	}
+-      else
+-	{
+-	  /* This is optional.  */
+-	  if (cp->gang_num_expr || gfc_match (" num :") == MATCH_ERROR)
+-	    return MATCH_ERROR;
+-	  else if (gfc_match (" %e ", &cp->gang_num_expr) != MATCH_YES)
+-	    return MATCH_ERROR;
+-	}
++    }
++  else if (gwv == GOMP_DIM_WORKER)
++    {
++      /* The 'num' argument is optional.  */
++      gfc_match (" num :");
+ 
+-      ret = gfc_match (" , ");
++      if (gfc_match (" %e ", &cp->worker_expr) != MATCH_YES)
++	return MATCH_ERROR;
+     }
++  else if (gwv == GOMP_DIM_VECTOR)
++    {
++      /* The 'length' argument is optional.  */
++      gfc_match (" length :");
+ 
+-  return gfc_match (" ) ");
++      if (gfc_match (" %e ", &cp->vector_expr) != MATCH_YES)
++	return MATCH_ERROR;
++    }
++  else
++    gfc_fatal_error ("Unexpected OpenACC parallelism.");
++
++  return gfc_match (" )");
+ }
+ 
+ static match
+@@ -640,17 +664,25 @@
+       needs_space = false;
+       first = false;
+       gfc_gobble_whitespace ();
++      old_loc = gfc_current_locus;
+       if ((mask & OMP_CLAUSE_ASYNC) && !c->async)
+ 	if (gfc_match ("async") == MATCH_YES)
+ 	  {
+ 	    c->async = true;
+-	    needs_space = false;
+-	    if (gfc_match (" ( %e )", &c->async_expr) != MATCH_YES)
++	    match m = gfc_match (" ( %e )", &c->async_expr);
++	    if (m == MATCH_ERROR)
+ 	      {
+-		c->async_expr = gfc_get_constant_expr (BT_INTEGER,
+-						       gfc_default_integer_kind,
+-						      &gfc_current_locus);
++		gfc_current_locus = old_loc;
++		break;
++	      }
++	    else if (m == MATCH_NO)
++	      {
++		c->async_expr
++		  = gfc_get_constant_expr (BT_INTEGER,
++					   gfc_default_integer_kind,
++					   &gfc_current_locus);
+ 		mpz_set_si (c->async_expr->value.integer, GOMP_ASYNC_NOVAL);
++		needs_space = true;
+ 	      }
+ 	    continue;
+ 	  }
+@@ -658,9 +690,13 @@
+ 	if (gfc_match ("gang") == MATCH_YES)
+ 	  {
+ 	    c->gang = true;
+-	    if (match_oacc_clause_gang(c) == MATCH_YES)
+-	      needs_space = false;
+-	    else
++	    match m = match_oacc_clause_gwv (c, GOMP_DIM_GANG);
++	    if (m == MATCH_ERROR)
++	      {
++		gfc_current_locus = old_loc;
++		break;
++	      }
++	    else if (m == MATCH_NO)
+ 	      needs_space = true;
+ 	    continue;
+ 	  }
+@@ -668,10 +704,13 @@
+ 	if (gfc_match ("worker") == MATCH_YES)
+ 	  {
+ 	    c->worker = true;
+-	    if (gfc_match (" ( num : %e )", &c->worker_expr) == MATCH_YES
+-	        || gfc_match (" ( %e )", &c->worker_expr) == MATCH_YES)
+-	      needs_space = false;
+-	    else
++	    match m = match_oacc_clause_gwv (c, GOMP_DIM_WORKER);
++	    if (m == MATCH_ERROR)
++	      {
++		gfc_current_locus = old_loc;
++		break;
++	      }
++	    else if (m == MATCH_NO)
+ 	      needs_space = true;
+ 	    continue;
+ 	  }
+@@ -683,10 +722,13 @@
+ 	if (gfc_match ("vector") == MATCH_YES)
+ 	  {
+ 	    c->vector = true;
+-	    if (gfc_match (" ( length : %e )", &c->vector_expr) == MATCH_YES
+-	        || gfc_match (" ( %e )", &c->vector_expr) == MATCH_YES)
+-	      needs_space = false;
+-	    else
++	    match m = match_oacc_clause_gwv (c, GOMP_DIM_VECTOR);
++	    if (m == MATCH_ERROR)
++	      {
++		gfc_current_locus = old_loc;
++		break;
++	      }
++	    if (m == MATCH_NO)
+ 	      needs_space = true;
+ 	    continue;
+ 	  }
+@@ -883,10 +925,16 @@
+ 	        && gfc_match ("wait") == MATCH_YES)
+ 	{
+ 	  c->wait = true;
+-	  match_oacc_expr_list (" (", &c->wait_list, false);
++	  match m = match_oacc_expr_list (" (", &c->wait_list, false);
++	  if (m == MATCH_ERROR)
++	    {
++	      gfc_current_locus = old_loc;
++	      break;
++	    }
++	  else if (m == MATCH_NO)
++	    needs_space = true;
+ 	  continue;
+ 	}
+-      old_loc = gfc_current_locus;
+       if ((mask & OMP_CLAUSE_REDUCTION)
+ 	  && gfc_match ("reduction ( ") == MATCH_YES)
+ 	{
+@@ -1582,15 +1630,18 @@
+ {
+   gfc_omp_clauses *c = gfc_get_omp_clauses ();
+   gfc_expr_list *wait_list = NULL, *el;
++  bool space = true;
++  match m;
+ 
+-  match_oacc_expr_list (" (", &wait_list, true);
+-  gfc_match_omp_clauses (&c, OACC_WAIT_CLAUSES, false, false, true);
++  m = match_oacc_expr_list (" (", &wait_list, true);
++  if (m == MATCH_ERROR)
++    return m;
++  else if (m == MATCH_YES)
++    space = false;
+ 
+-  if (gfc_match_omp_eos () != MATCH_YES)
+-    {
+-      gfc_error ("Unexpected junk in !$ACC WAIT at %C");
+-      return MATCH_ERROR;
+-    }
++  if (gfc_match_omp_clauses (&c, OACC_WAIT_CLAUSES, space, space, true)
++      == MATCH_ERROR)
++    return MATCH_ERROR;
+ 
+   if (wait_list)
+     for (el = wait_list; el; el = el->next)
+@@ -1623,6 +1674,10 @@
  gfc_match_oacc_cache (void)
  {
    gfc_omp_clauses *c = gfc_get_omp_clauses ();
@@ -20461,7 +20885,22 @@ Index: gcc/fortran/ChangeLog
 ===================================================================
 --- a/src/gcc/fortran/ChangeLog	(.../tags/gcc_6_1_0_release)
 +++ b/src/gcc/fortran/ChangeLog	(.../branches/gcc-6-branch)
-@@ -1,3 +1,166 @@
+@@ -1,3 +1,181 @@
++2016-06-29  Cesar Philippidis  <cesar at codesourcery.com>
++
++	Back port from trunk
++	2016-06-29  Cesar Philippidis  <cesar at codesourcery.com>
++
++	* openmp.c (match_oacc_clause_gang): Rename to ...
++	(match_oacc_clause_gwv): this.  Add support for OpenACC worker and
++	vector clauses.
++	(gfc_match_omp_clauses): Use match_oacc_clause_gwv for
++	OMP_CLAUSE_{GANG,WORKER,VECTOR}.  Propagate any MATCH_ERRORs for
++	invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
++	(gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
++	oacc_expr_lists.  Adjust the first and needs_space arguments to
++	gfc_match_omp_clauses.
++
 +2016-06-27  Paul Thomas  <pault at gcc.gnu.org>
 +
 +	PR fortran/70673
@@ -805376,6 +805815,27 @@ Index: gcc/hsa-gen.c
    make_edge (e->src, default_label_bb, EDGE_FALSE_VALUE);
  
    hsa_cfun->m_modified_cfg = true;
+Index: gcc/df-problems.c
+===================================================================
+--- a/src/gcc/df-problems.c	(.../tags/gcc_6_1_0_release)
++++ b/src/gcc/df-problems.c	(.../branches/gcc-6-branch)
+@@ -3498,13 +3498,13 @@
+ 
+   FOR_BB_INSNS_REVERSE (bb, insn)
+     {
++      if (!INSN_P (insn))
++	continue;
++
+       df_insn_info *insn_info = DF_INSN_INFO_GET (insn);
+       df_mw_hardreg *mw;
+       int debug_insn;
+ 
+-      if (!INSN_P (insn))
+-	continue;
+-
+       debug_insn = DEBUG_INSN_P (insn);
+ 
+       bitmap_clear (do_not_gen);
 Index: gcc/config.gcc
 ===================================================================
 --- a/src/gcc/config.gcc	(.../tags/gcc_6_1_0_release)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-6.git



More information about the Reproducible-commits mailing list