public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gcc] rhel-f41-base: 5.0.0-0.6
@ 2026-06-29 12:26 Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2026-06-29 12:26 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/gcc
Branch : rhel-f41-base
Commit : b8d50582fb9c4c74a446172f284543fbcac1afa4
Author : Jakub Jelinek <jakub@redhat.com>
Date   : 2015-01-30T19:35:36+01:00
Stats  : +433/-58 in 7 file(s)
URL    : https://src.fedoraproject.org/rpms/gcc/c/b8d50582fb9c4c74a446172f284543fbcac1afa4?branch=rhel-f41-base

Log:
5.0.0-0.6

---
diff --git a/.gitignore b/.gitignore
index 8da89f4..1a413c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /gcc-5.0.0-20150123.tar.bz2
+/gcc-5.0.0-20150130.tar.bz2

diff --git a/gcc.spec b/gcc.spec
index a43a6e9..df34e41 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,9 +1,9 @@
-%global DATE 20150123
-%global SVNREV 220063
+%global DATE 20150130
+%global SVNREV 220295
 %global gcc_version 5.0.0
 # Note, gcc_release must be integer, if you want to add suffixes to
 # %{release}, append them after %{gcc_release} on Release: line.
-%global gcc_release 0.5
+%global gcc_release 0.6
 %global _unpackaged_files_terminate_build 0
 %global _performance_build 1
 %global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
@@ -198,8 +198,8 @@ Patch11: gcc5-no-add-needed.patch
 Patch12: gcc5-libgo-p224.patch
 Patch13: gcc5-aarch64-async-unw-tables.patch
 Patch14: gcc5-libsanitize-aarch64-va42.patch
-Patch15: gcc5-ppc-jit.patch
-Patch16: gcc5-pr64738.patch
+Patch15: gcc5-pr61925.patch
+Patch16: gcc5-pr64817.patch
 
 # On ARM EABI systems, we do want -gnueabi to be part of the
 # target triple.
@@ -749,8 +749,8 @@ package or when debugging this package.
 rm -f libgo/go/crypto/elliptic/p224{,_test}.go
 %patch13 -p0 -b .aarch64-async-unw-tables~
 %patch14 -p0 -b .libsanitize-aarch64-va42~
-%patch15 -p0 -b .ppc-jit~
-%patch16 -p0 -b .pr64738~
+%patch15 -p0 -b .pr61925~
+%patch16 -p0 -b .pr64817~
 
 %if 0%{?_enable_debug_packages}
 mkdir dwz-wrapper
@@ -2936,5 +2936,27 @@ fi
 %doc rpm.doc/changelogs/libcc1/ChangeLog*
 
 %changelog
+* Fri Jan 30 2015 Jakub Jelinek <jakub@redhat.com> 5.0.0-0.6
+- update from the trunk
+  - PRs ada/64349, bootstrap/64612, bootstrap/64754, c++/49508, c++/58597,
+	c++/63889, c++/64521, c++/64717, c/64709, c/64766, c/64778,
+	fortran/62044, fortran/63861, fortran/64230, fortran/64771, go/63565,
+	go/64510, go/64595, go/64738, ipa/60871, ipa/64139, ipa/64282,
+	ipa/64730, ipa/64776, ipa/64801, jit/64257, jit/64708, jit/64780,
+	libffi/64779, libffi/64799, libffi/64855, libfortran/64770,
+	libgomp/64635, libstdc++/64368, libstdc++/64798, libstdc++/64828,
+	lto/64837, middle-end/64421, middle-end/64764, middle-end/64805,
+	middle-end/64809, other/63504, rtl-optimization/61058, target/15184,
+	target/29366, target/49263, target/51244, target/52933, target/53987,
+	target/54236, target/59533, target/64345, target/64580, target/64617,
+	target/64659, target/64761, target/64795, target/64806,
+	testsuite/64712, tree-optimization/56273, tree-optimization/59124,
+	tree-optimization/64277, tree-optimization/64718,
+	tree-optimization/64746, tree-optimization/64807,
+	tree-optimization/64829, tree-optimization/64844,
+	tree-optimization/64853, ubsan/64741
+- fix up #pragma GCC target handling on x86 (PR target/61925)
+- fix up VTA compile time hog during expansion (PR debug/64817)
+
 * Fri Jan 23 2015 Jakub Jelinek <jakub@redhat.com> 5.0.0-0.5
 - new package

diff --git a/gcc5-ppc-jit.patch b/gcc5-ppc-jit.patch
deleted file mode 100644
index 76fd609..0000000
--- a/gcc5-ppc-jit.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-2015-01-19  David Malcolm  <dmalcolm@redhat.com>
-
-	* config/rs6000/rs6000.c (rs6000_output_function_epilogue):
-	Support the JIT by using 0 as the language type.
-
---- gcc/config/rs6000/rs6000.c
-+++ gcc/config/rs6000/rs6000.c
-@@ -25491,11 +25491,12 @@ rs6000_output_function_epilogue (FILE *file,
- 	 use language_string.
- 	 C is 0.  Fortran is 1.  Pascal is 2.  Ada is 3.  C++ is 9.
- 	 Java is 13.  Objective-C is 14.  Objective-C++ isn't assigned
--	 a number, so for now use 9.  LTO and Go aren't assigned numbers
-+	 a number, so for now use 9.  LTO, Go and JIT aren't assigned numbers
- 	 either, so for now use 0.  */
-       if (lang_GNU_C ()
- 	  || ! strcmp (language_string, "GNU GIMPLE")
--	  || ! strcmp (language_string, "GNU Go"))
-+	  || ! strcmp (language_string, "GNU Go")
-+	  || ! strcmp (language_string, "libgccjit"))
- 	i = 0;
-       else if (! strcmp (language_string, "GNU F77")
- 	       || ! strcmp (language_string, "GNU Fortran"))

diff --git a/gcc5-pr61925.patch b/gcc5-pr61925.patch
new file mode 100644
index 0000000..f8e6a20
--- /dev/null
+++ b/gcc5-pr61925.patch
@@ -0,0 +1,220 @@
+2015-01-28  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/61925
+	* config/i386/i386.c (ix86_reset_to_default_globals): Removed.
+	(ix86_reset_previous_fndecl): Restore it here, unconditionally.
+	(ix86_set_current_function): Rewritten.
+	(ix86_add_new_builtins): Temporarily clear current_target_pragma
+	when creating builtin fndecls.
+
+	* gcc.target/i386/pr61925-1.c: New test.
+	* gcc.target/i386/pr61925-2.c: New test.
+	* gcc.target/i386/pr61925-3.c: New test.
+
+--- gcc/config/i386/i386.c.jj	2015-01-26 22:27:20.000000000 +0100
++++ gcc/config/i386/i386.c	2015-01-28 14:41:03.008727087 +0100
+@@ -5076,35 +5076,20 @@ ix86_can_inline_p (tree caller, tree cal
+ /* Remember the last target of ix86_set_current_function.  */
+ static GTY(()) tree ix86_previous_fndecl;
+ 
+-/* Set target globals to default.  */
++/* Set targets globals to the default (or current #pragma GCC target
++   if active).  Invalidate ix86_previous_fndecl cache.  */
+ 
+-static void
+-ix86_reset_to_default_globals (void)
+-{
+-  tree old_tree = (ix86_previous_fndecl
+-		   ? DECL_FUNCTION_SPECIFIC_TARGET (ix86_previous_fndecl)
+-		   : NULL_TREE);
+-
+-  if (old_tree)
+-    {
+-      tree new_tree = target_option_current_node;
+-      cl_target_option_restore (&global_options,
+-				TREE_TARGET_OPTION (new_tree));
+-      if (TREE_TARGET_GLOBALS (new_tree))
+-	restore_target_globals (TREE_TARGET_GLOBALS (new_tree));
+-      else if (new_tree == target_option_default_node)
+-	restore_target_globals (&default_target_globals);
+-      else
+-	TREE_TARGET_GLOBALS (new_tree)
+-	  = save_target_globals_default_opts ();
+-    }
+-}
+-
+-/* Invalidate ix86_previous_fndecl cache.  */
+ void
+ ix86_reset_previous_fndecl (void)
+ {
+-  ix86_reset_to_default_globals ();
++  tree new_tree = target_option_current_node;
++  cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree));
++  if (TREE_TARGET_GLOBALS (new_tree))
++    restore_target_globals (TREE_TARGET_GLOBALS (new_tree));
++  else if (new_tree == target_option_default_node)
++    restore_target_globals (&default_target_globals);
++  else
++    TREE_TARGET_GLOBALS (new_tree) = save_target_globals_default_opts ();
+   ix86_previous_fndecl = NULL_TREE;
+ }
+ 
+@@ -5117,34 +5102,39 @@ ix86_set_current_function (tree fndecl)
+   /* Only change the context if the function changes.  This hook is called
+      several times in the course of compiling a function, and we don't want to
+      slow things down too much or call target_reinit when it isn't safe.  */
+-  if (fndecl && fndecl != ix86_previous_fndecl)
+-    {
+-      tree old_tree = (ix86_previous_fndecl
+-		       ? DECL_FUNCTION_SPECIFIC_TARGET (ix86_previous_fndecl)
+-		       : NULL_TREE);
++  if (fndecl == ix86_previous_fndecl)
++    return;
+ 
+-      tree new_tree = (fndecl
+-		       ? DECL_FUNCTION_SPECIFIC_TARGET (fndecl)
+-		       : NULL_TREE);
++  tree old_tree;
++  if (ix86_previous_fndecl == NULL_TREE)
++    old_tree = target_option_current_node;
++  else if (DECL_FUNCTION_SPECIFIC_TARGET (ix86_previous_fndecl))
++    old_tree = DECL_FUNCTION_SPECIFIC_TARGET (ix86_previous_fndecl);
++  else
++    old_tree = target_option_default_node;
+ 
+-      if (old_tree == new_tree)
+-	;
++  if (fndecl == NULL_TREE)
++    {
++      if (old_tree != target_option_current_node)
++	ix86_reset_previous_fndecl ();
++      return;
++    }
+ 
+-      else if (new_tree && new_tree != target_option_default_node)
+-	{
+-	  cl_target_option_restore (&global_options,
+-				    TREE_TARGET_OPTION (new_tree));
+-	  if (TREE_TARGET_GLOBALS (new_tree))
+-	    restore_target_globals (TREE_TARGET_GLOBALS (new_tree));
+-	  else
+-	    TREE_TARGET_GLOBALS (new_tree)
+-	      = save_target_globals_default_opts ();
+-	}
++  tree new_tree = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
++  if (new_tree == NULL_TREE)
++    new_tree = target_option_default_node;
+ 
+-      else if (old_tree && old_tree != target_option_default_node)
+-	ix86_reset_to_default_globals ();
+-      ix86_previous_fndecl = fndecl;
++  if (old_tree != new_tree)
++    {
++      cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree));
++      if (TREE_TARGET_GLOBALS (new_tree))
++	restore_target_globals (TREE_TARGET_GLOBALS (new_tree));
++      else if (new_tree == target_option_default_node)
++	restore_target_globals (&default_target_globals);
++      else
++	TREE_TARGET_GLOBALS (new_tree) = save_target_globals_default_opts ();
+     }
++  ix86_previous_fndecl = fndecl;
+ }
+ 
+ \f
+@@ -30580,6 +30570,8 @@ static void
+ ix86_add_new_builtins (HOST_WIDE_INT isa)
+ {
+   int i;
++  tree saved_current_target_pragma = current_target_pragma;
++  current_target_pragma = NULL_TREE;
+ 
+   for (i = 0; i < (int)IX86_BUILTIN_MAX; i++)
+     {
+@@ -30606,6 +30598,8 @@ ix86_add_new_builtins (HOST_WIDE_INT isa
+ 	    TREE_NOTHROW (decl) = 1;
+ 	}
+     }
++
++  current_target_pragma = saved_current_target_pragma;
+ }
+ 
+ /* Bits for builtin_description.flag.  */
+--- gcc/testsuite/gcc.target/i386/pr61925-1.c.jj	2015-01-28 15:10:45.756833647 +0100
++++ gcc/testsuite/gcc.target/i386/pr61925-1.c	2015-01-28 15:11:49.911722473 +0100
+@@ -0,0 +1,21 @@
++/* PR target/61925 */
++/* { dg-do compile } */
++/* { dg-options "-O2 -w" } */
++/* { dg-additional-options "-march=i386 -mno-sse" { target ia32 } } */
++
++#pragma GCC push_options
++#pragma GCC target("sse")
++typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
++typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
++__m128i
++bar (__m128 __A)
++{
++}
++
++#pragma GCC pop_options
++
++__attribute__ ((vector_size (16))) int
++foo (__attribute__ ((vector_size (16))) int a, __attribute__ ((vector_size (16))) int b)
++{
++  return a + b;
++}
+--- gcc/testsuite/gcc.target/i386/pr61925-2.c.jj	2015-01-28 15:10:48.651783506 +0100
++++ gcc/testsuite/gcc.target/i386/pr61925-2.c	2015-01-28 15:11:55.432626851 +0100
+@@ -0,0 +1,21 @@
++/* PR target/61925 */
++/* { dg-do compile } */
++/* { dg-options "-O2 -w" } */
++/* { dg-additional-options "-march=i386 -mno-sse" { target ia32 } } */
++
++#pragma GCC push_options
++#pragma GCC target("sse")
++typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
++extern __inline __m128 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
++foo (void)
++{
++}
++
++#pragma GCC target("sse2")
++#pragma GCC pop_options
++
++__attribute__ ((vector_size (16))) int
++bar (__attribute__ ((vector_size (16))) int a, __attribute__ ((vector_size (16))) int b)
++{
++  return a + b;
++}
+--- gcc/testsuite/gcc.target/i386/pr61925-3.c.jj	2015-01-28 15:10:51.538733503 +0100
++++ gcc/testsuite/gcc.target/i386/pr61925-3.c	2015-01-28 15:12:01.316524940 +0100
+@@ -0,0 +1,27 @@
++/* PR target/61925 */
++/* { dg-do compile } */
++/* { dg-options "-O2 -w" } */
++/* { dg-additional-options "-march=i386 -mno-sse" { target ia32 } } */
++
++#pragma GCC push_options
++#pragma GCC target("sse")
++typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
++
++void
++foo (void)
++{
++}
++
++__attribute__((target ("avx"))) void
++bar (void)
++{
++}
++
++#pragma GCC target("sse2")
++#pragma GCC pop_options
++
++__attribute__ ((vector_size (16))) int
++baz (__attribute__ ((vector_size (16))) int a, __attribute__ ((vector_size (16))) int b)
++{
++  return a + b;
++}

diff --git a/gcc5-pr64738.patch b/gcc5-pr64738.patch
deleted file mode 100644
index cfb44cc..0000000
--- a/gcc5-pr64738.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-2015-01-23  Jakub Jelinek  <jakub@redhat.com>
-
-	PR go/64738
-	* Makefile.am (AM_LDFLAGS): Remove -static-libgo flag.
-	* Makefile.in: Regenerated.
-
---- gotools/Makefile.am	2015-01-23 09:42:05.747471685 +0100
-+++ gotools/Makefile.am	2015-01-23 21:04:36.970202637 +0100
-@@ -38,7 +38,7 @@ endif
- GOCFLAGS = $(CFLAGS_FOR_TARGET)
- GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
- 
--AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -static-libgo
-+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
- GOLINK = $(GOCOMPILER) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
- 
- cmdsrcdir = $(srcdir)/../libgo/go/cmd
---- gotools/Makefile.in	2015-01-23 09:42:05.724472081 +0100
-+++ gotools/Makefile.in	2015-01-23 21:04:44.940065201 +0100
-@@ -230,7 +230,7 @@ LIBGODEP = $(libgodir)/libgo.la
- # Use the compiler we just built.
- @NATIVE_TRUE@GOCOMPILER = $(GOC_FOR_TARGET)
- GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
--AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -static-libgo
-+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
- GOLINK = $(GOCOMPILER) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
- cmdsrcdir = $(srcdir)/../libgo/go/cmd
- go_cmd_go_files = \

diff --git a/gcc5-pr64817.patch b/gcc5-pr64817.patch
new file mode 100644
index 0000000..b1e5b37
--- /dev/null
+++ b/gcc5-pr64817.patch
@@ -0,0 +1,182 @@
+2015-01-30  Jakub Jelinek  <jakub@redhat.com>
+
+	PR debug/64817
+	* cfgexpand.c (deep_ter_debug_map): New variable.
+	(avoid_deep_ter_for_debug): New function.
+	(expand_debug_expr): If TERed SSA_NAME is in
+	deep_ter_debug_map, use the corresponding DEBUG_EXPR_DECL
+	instead of trying to expand SSA_NAME's def stmt.
+	(expand_debug_locations): When expanding debug bind
+	of a DEBUG_EXPR_DECL to corresponding SSA_NAME,
+	temporarily remove the DEBUG_EXPR_DECL from deep_ter_debug_map's
+	value.
+	(pass_expand::execute): Call avoid_deep_ter_for_debug on
+	all debug bind stmts.  Delete deep_ter_debug_map after
+	expand_debug_location if non-NULL and clear it.
+
+	* gcc.dg/pr64817-1.c: New test.
+	* gcc.dg/pr64817-2.c: New test.
+
+--- gcc/cfgexpand.c.jj	2015-01-28 21:24:56.000000000 +0100
++++ gcc/cfgexpand.c	2015-01-30 13:22:46.002579984 +0100
+@@ -3767,6 +3767,48 @@ convert_debug_memory_address (machine_mo
+   return x;
+ }
+ 
++/* Map from SSA_NAMEs to corresponding DEBUG_EXPR_DECLs created
++   by avoid_deep_ter_for_debug.  */
++
++hash_map<tree, tree> *deep_ter_debug_map;
++
++/* Split too deep TER chains for debug stmts using debug temporaries.  */
++
++static void
++avoid_deep_ter_for_debug (gimple stmt, int depth)
++{
++  use_operand_p use_p;
++  ssa_op_iter iter;
++  FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE)
++    {
++      tree use = USE_FROM_PTR (use_p);
++      if (TREE_CODE (use) != SSA_NAME || SSA_NAME_IS_DEFAULT_DEF (use))
++	continue;
++      gimple g = get_gimple_for_ssa_name (use);
++      if (g == NULL)
++	continue;
++      if (depth > 6 && !stmt_ends_bb_p (g))
++	{
++	  if (deep_ter_debug_map == NULL)
++	    deep_ter_debug_map = new hash_map<tree, tree>;
++
++	  tree &vexpr = deep_ter_debug_map->get_or_insert (use);
++	  if (vexpr != NULL)
++	    continue;
++	  vexpr = make_node (DEBUG_EXPR_DECL);
++	  gimple def_temp = gimple_build_debug_bind (vexpr, use, g);
++	  DECL_ARTIFICIAL (vexpr) = 1;
++	  TREE_TYPE (vexpr) = TREE_TYPE (use);
++	  DECL_MODE (vexpr) = TYPE_MODE (TREE_TYPE (use));
++	  gimple_stmt_iterator gsi = gsi_for_stmt (g);
++	  gsi_insert_after (&gsi, def_temp, GSI_NEW_STMT);
++	  avoid_deep_ter_for_debug (def_temp, 0);
++	}
++      else
++	avoid_deep_ter_for_debug (g, depth + 1);
++    }
++}
++
+ /* Return an RTX equivalent to the value of the parameter DECL.  */
+ 
+ static rtx
+@@ -4654,7 +4696,16 @@ expand_debug_expr (tree exp)
+ 	gimple g = get_gimple_for_ssa_name (exp);
+ 	if (g)
+ 	  {
+-	    op0 = expand_debug_expr (gimple_assign_rhs_to_tree (g));
++	    tree t = NULL_TREE;
++	    if (deep_ter_debug_map)
++	      {
++		tree *slot = deep_ter_debug_map->get (exp);
++		if (slot)
++		  t = *slot;
++	      }
++	    if (t == NULL_TREE)
++	      t = gimple_assign_rhs_to_tree (g);
++	    op0 = expand_debug_expr (t);
+ 	    if (!op0)
+ 	      return NULL;
+ 	  }
+@@ -4961,6 +5012,25 @@ expand_debug_locations (void)
+ 	    if (INSN_VAR_LOCATION_STATUS (insn)
+ 		== VAR_INIT_STATUS_UNINITIALIZED)
+ 	      val = expand_debug_source_expr (value);
++	    /* The avoid_deep_ter_for_debug function inserts
++	       debug bind stmts after SSA_NAME definition, with the
++	       SSA_NAME as the whole bind location.  Disable temporarily
++	       expansion of that SSA_NAME into the DEBUG_EXPR_DECL
++	       being defined in this DEBUG_INSN.  */
++	    else if (deep_ter_debug_map && TREE_CODE (value) == SSA_NAME)
++	      {
++		tree *slot = deep_ter_debug_map->get (value);
++		if (slot)
++		  {
++		    if (*slot == INSN_VAR_LOCATION_DECL (insn))
++		      *slot = NULL_TREE;
++		    else
++		      slot = NULL;
++		  }
++		val = expand_debug_expr (value);
++		if (slot)
++		  *slot = INSN_VAR_LOCATION_DECL (insn);
++	      }
+ 	    else
+ 	      val = expand_debug_expr (value);
+ 	    gcc_assert (last == get_last_insn ());
+@@ -5821,6 +5891,15 @@ pass_expand::execute (function *fun)
+   timevar_pop (TV_OUT_OF_SSA);
+   SA.partition_to_pseudo = XCNEWVEC (rtx, SA.map->num_partitions);
+ 
++  if (MAY_HAVE_DEBUG_STMTS && flag_tree_ter)
++    {
++      gimple_stmt_iterator gsi;
++      FOR_EACH_BB_FN (bb, cfun)
++	for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
++	  if (gimple_debug_bind_p (gsi_stmt (gsi)))
++	    avoid_deep_ter_for_debug (gsi_stmt (gsi), 0);
++    }
++
+   /* Make sure all values used by the optimization passes have sane
+      defaults.  */
+   reg_renumber = 0;
+@@ -6008,6 +6087,12 @@ pass_expand::execute (function *fun)
+   if (MAY_HAVE_DEBUG_INSNS)
+     expand_debug_locations ();
+ 
++  if (deep_ter_debug_map)
++    {
++      delete deep_ter_debug_map;
++      deep_ter_debug_map = NULL;
++    }
++
+   /* Free stuff we no longer need after GIMPLE optimizations.  */
+   free_dominance_info (CDI_DOMINATORS);
+   free_dominance_info (CDI_POST_DOMINATORS);
+--- gcc/testsuite/gcc.dg/pr64817-1.c.jj	2015-01-30 13:33:05.061143850 +0100
++++ gcc/testsuite/gcc.dg/pr64817-1.c	2015-01-30 13:32:33.000000000 +0100
+@@ -0,0 +1,20 @@
++/* PR debug/64817 */
++/* { dg-do compile } */
++/* { dg-options "-O3 -g" } */
++
++int a, b, d;
++
++void
++foo (void)
++{
++  for (b = 0; b < 9; b++)
++    {
++      int e;
++      for (d = 0; d < 5; d++)
++	{
++	  a &= 231;
++	  a ^= 14;
++	}
++      e = (a ^= 1) < 0;
++    }
++}
+--- gcc/testsuite/gcc.dg/pr64817-2.c.jj	2015-01-20 10:01:16.345964420 +0100
++++ gcc/testsuite/gcc.dg/pr64817-2.c	2015-01-30 18:37:49.055911292 +0100
+@@ -0,0 +1,13 @@
++/* PR debug/64817 */
++/* { dg-do compile } */
++/* { dg-options "-O3 -g" } */
++
++int a;
++
++void
++foo (void)
++{
++  int e;
++  a = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((a & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) & 231) ^ 14) ^ 1;
++  e = (a < 0);
++}

diff --git a/sources b/sources
index db77005..b488869 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-94860e75c4808cec7b783415064abee8  gcc-5.0.0-20150123.tar.bz2
+80ccb31c5fbade3579f4aa74758f4fd9  gcc-5.0.0-20150130.tar.bz2

^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [rpms/gcc] rhel-f41-base: 5.0.0-0.6
@ 2026-06-29 12:26 Jakub Jelinek
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2026-06-29 12:26 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/gcc
Branch : rhel-f41-base
Commit : ff411575ccf04625068f1cc9403100292807d3b7
Author : Jakub Jelinek <jakub@redhat.com>
Date   : 2015-01-30T20:16:01+01:00
Stats  : +104/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/gcc/c/ff411575ccf04625068f1cc9403100292807d3b7?branch=rhel-f41-base

Log:
5.0.0-0.6

---
diff --git a/gcc.spec b/gcc.spec
index df34e41..aebfa3e 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -200,6 +200,7 @@ Patch13: gcc5-aarch64-async-unw-tables.patch
 Patch14: gcc5-libsanitize-aarch64-va42.patch
 Patch15: gcc5-pr61925.patch
 Patch16: gcc5-pr64817.patch
+Patch17: gcc5-pr64803.patch
 
 # On ARM EABI systems, we do want -gnueabi to be part of the
 # target triple.
@@ -751,6 +752,7 @@ rm -f libgo/go/crypto/elliptic/p224{,_test}.go
 %patch14 -p0 -b .libsanitize-aarch64-va42~
 %patch15 -p0 -b .pr61925~
 %patch16 -p0 -b .pr64817~
+%patch17 -p0 -b .pr64803~
 
 %if 0%{?_enable_debug_packages}
 mkdir dwz-wrapper
@@ -2957,6 +2959,7 @@ fi
 	tree-optimization/64853, ubsan/64741
 - fix up #pragma GCC target handling on x86 (PR target/61925)
 - fix up VTA compile time hog during expansion (PR debug/64817)
+- __LINE__ handling fix (PR preprocessor/64803)
 
 * Fri Jan 23 2015 Jakub Jelinek <jakub@redhat.com> 5.0.0-0.5
 - new package

diff --git a/gcc5-pr64803.patch b/gcc5-pr64803.patch
new file mode 100644
index 0000000..db3558d
--- /dev/null
+++ b/gcc5-pr64803.patch
@@ -0,0 +1,101 @@
+2015-01-30  Dodji Seketeli  <dodji@redhat.com>
+
+	PR preprocessor/64803
+	* internal.h (cpp_reader::top_most_macro_node): New data member.
+	* macro.c (enter_macro_context): Pass the location of the end of
+	the top-most invocation of the function-like macro, or the
+	location of the expansion point of the top-most object-like macro.
+	(cpp_get_token_1): Store the top-most macro node in the new
+	pfile->top_most_macro_node data member.
+
+	* gcc.dg/cpp/builtin-macro-1.c: New test case.
+
+--- libcpp/internal.h
++++ libcpp/internal.h
+@@ -421,6 +421,11 @@ struct cpp_reader
+      macro invocation.  */
+   source_location invocation_location;
+ 
++  /* This is the node representing the macro being expanded at
++     top-level.  The value of this data member is valid iff
++     in_macro_expansion_p() returns TRUE.  */
++  cpp_hashnode *top_most_macro_node;
++
+   /* Nonzero if we are about to expand a macro.  Note that if we are
+      really expanding a macro, the function macro_of_context returns
+      the macro being expanded and this flag is set to false.  Client
+--- libcpp/macro.c
++++ libcpp/macro.c
+@@ -1228,7 +1228,24 @@ enter_macro_context (cpp_reader *pfile, cpp_hashnode *node,
+ 
+   pfile->about_to_expand_macro_p = false;
+   /* Handle built-in macros and the _Pragma operator.  */
+-  return builtin_macro (pfile, node, location);
++  {
++    source_location loc;
++    if (/* The top-level macro invocation that triggered the expansion
++	   we are looking at is with a standard macro ...*/
++	!(pfile->top_most_macro_node->flags & NODE_BUILTIN)
++	/* ... and it's a function-like macro invocation.  */
++	&& pfile->top_most_macro_node->value.macro->fun_like)
++      /* Then the location of the end of the macro invocation is the
++	 location of the closing parenthesis.  */
++      loc = pfile->cur_token[-1].src_loc;
++    else
++      /* Otherwise, the location of the end of the macro invocation is
++	 the location of the expansion point of that top-level macro
++	 invocation.  */
++      loc = location;
++
++    return builtin_macro (pfile, node, loc);
++  }
+ }
+ 
+ /* De-allocate the memory used by BUFF which is an array of instances
+@@ -2460,9 +2477,13 @@ cpp_get_token_1 (cpp_reader *pfile, source_location *location)
+ 	{
+ 	  int ret = 0;
+ 	  /* If not in a macro context, and we're going to start an
+-	     expansion, record the location.  */
++	     expansion, record the location and the top level macro
++	     about to be expanded.  */
+ 	  if (!in_macro_expansion_p (pfile))
+-	    pfile->invocation_location = result->src_loc;
++	    {
++	      pfile->invocation_location = result->src_loc;
++	      pfile->top_most_macro_node = node;
++	    }
+ 	  if (pfile->state.prevent_expansion)
+ 	    break;
+ 
+--- gcc/testsuite/gcc.dg/cpp/builtin-macro-1.c
++++ gcc/testsuite/gcc.dg/cpp/builtin-macro-1.c
+@@ -0,0 +1,28 @@
++/* Origin PR preprocessor/64803
++
++   This test ensures that the value the __LINE__ macro expands to is
++   constant and corresponds to the line of the closing parenthesis of
++   the top-most function-like macro expansion it's part of.
++
++   { dg-do run }
++   { do-options -no-integrated-cpp }  */
++
++#include <assert.h>
++
++#define C(a, b) a ## b
++#define L(x) C(L, x)
++#define M(a) int L(__LINE__) = __LINE__; assert(L(__LINE__) == __LINE__);
++
++int
++main()
++{
++  M(a
++    );
++
++  assert(L20 == 20);		/* 20 is the line number of the
++				   closing parenthesis of the
++				   invocation of the M macro.  Please
++				   adjust in case the layout of this
++				   file changes.  */
++  return 0;
++}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-29 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-29 12:26 [rpms/gcc] rhel-f41-base: 5.0.0-0.6 Jakub Jelinek
  -- strict thread matches above, loose matches on Subject: below --
2026-06-29 12:26 Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox