Fix up handling of not really variable VLAs (PR libgomp/83590)

Message ID 20180111182453.GT1833@tucnak
State New
Headers show
Series
  • Fix up handling of not really variable VLAs (PR libgomp/83590)
Related show

Commit Message

Jakub Jelinek Jan. 11, 2018, 6:24 p.m.
Hi!

My recent C FE lval folding improvements apparently broke OpenMP/OpenACC
handling of constant size VLAs, e.g.
  const int size = 4096;
  int array[size];
The problem is that the OpenMP/ACC gimplification/lowering/expansion relies
on TREE_CODE (DECL_SIZE_UNIT ()) != INTEGER_CST, or !TREE_CONSTANT
(TYPE_SIZE_UNIT ()) or variably_modified_type_p predicates to find VLAs that
have been processed by gimplify_vla_decl and need special handling.
The problem is that as the C FE got better at folding stuff, we end up with
decls that have non-INTEGER_CST DECL_SIZE_UNIT which after
gimplify_one_sizepos becomes INTEGER_CST, so the only way to distinguish it
from non-vlas is that it has certain DECL_VALUE_EXPR.  There are many other
reasons why something could have a DECL_VALUE_EXPR, so checking that sounds
very error-prone.

This patch instead treats such arrays as non-VLAs, by first gimplifying
DECL_SIZE_UNIT and only then checking if it is non-INTEGER_CST.
It will surely result in better code, even when not using OpenMP/OpenACC,
some people think const in C is the same thing as C++, on the other side,
there might be some carefully crafted code that uses these weirdo constant
VLAs and expect them to be deallocated every time.
  { const int n = 4096*4096; int vla[n]; foo (vla); }
  { const int n = 4096*4096; float vla[n]; bar (vla); }
...
even when for some reason we wouldn't be able to share the constant size
array stack memory.

Is this acceptable optimization anyway?  Bootstrapped/regtested on
x86_64-linux and i686-linux.

The alternative would be to add some bit on the decls that would tell the
rest of gimplifier and middle-end that gimplify_vla_decl has been done on it
and it needs to be treated specially.

2018-01-11  Jakub Jelinek  <jakub@redhat.com>

	PR libgomp/83590
	* gimplify.c (gimplify_vla_decl): Don't call gimplify_one_sizepos
	for DEC_SIZE and DECL_SIZE_UNIT here...
	(gimplify_decl_expr): ... but here before testing if DECL_SIZE_UNIT
	is INTEGER_CST.
	(gimplify_target_expr): And here too.  Call gimplify_type_sizes
	always, not just for VLAs.  Check DECL_SIZE_UNIT rather than DECL_SIZE
	for consistency with gimplify_decl_expr.

	* gcc.target/i386/stack-check-18.c (main): Drop const from size
	variable.


	Jakub

Comments

Richard Biener Jan. 12, 2018, 8:16 a.m. | #1
On Thu, 11 Jan 2018, Jakub Jelinek wrote:

> Hi!
> 
> My recent C FE lval folding improvements apparently broke OpenMP/OpenACC
> handling of constant size VLAs, e.g.
>   const int size = 4096;
>   int array[size];
> The problem is that the OpenMP/ACC gimplification/lowering/expansion relies
> on TREE_CODE (DECL_SIZE_UNIT ()) != INTEGER_CST, or !TREE_CONSTANT
> (TYPE_SIZE_UNIT ()) or variably_modified_type_p predicates to find VLAs that
> have been processed by gimplify_vla_decl and need special handling.
> The problem is that as the C FE got better at folding stuff, we end up with
> decls that have non-INTEGER_CST DECL_SIZE_UNIT which after
> gimplify_one_sizepos becomes INTEGER_CST, so the only way to distinguish it
> from non-vlas is that it has certain DECL_VALUE_EXPR.  There are many other
> reasons why something could have a DECL_VALUE_EXPR, so checking that sounds
> very error-prone.
> 
> This patch instead treats such arrays as non-VLAs, by first gimplifying
> DECL_SIZE_UNIT and only then checking if it is non-INTEGER_CST.
> It will surely result in better code, even when not using OpenMP/OpenACC,
> some people think const in C is the same thing as C++, on the other side,
> there might be some carefully crafted code that uses these weirdo constant
> VLAs and expect them to be deallocated every time.
>   { const int n = 4096*4096; int vla[n]; foo (vla); }
>   { const int n = 4096*4096; float vla[n]; bar (vla); }
> ...
> even when for some reason we wouldn't be able to share the constant size
> array stack memory.
> 
> Is this acceptable optimization anyway?  Bootstrapped/regtested on
> x86_64-linux and i686-linux.
>
> The alternative would be to add some bit on the decls that would tell the
> rest of gimplifier and middle-end that gimplify_vla_decl has been done on it
> and it needs to be treated specially.

Or another workaround would be to make sure non-constant sizepos
stay non-constant by doing sth like the following?  FEs can mark
expressions as TREE_CONSTANT if they don't want this behavior
for things that might optimize to constants during gimplification.

Index: gcc/gimplify.c
===================================================================
--- gcc/gimplify.c      (revision 256535)
+++ gcc/gimplify.c      (working copy)
@@ -12567,9 +12567,13 @@ gimplify_one_sizepos (tree *expr_p, gimp
 
   *expr_p = unshare_expr (expr);
 
+  bool non_constant_p = ! TREE_CONSTANT (*expr_p);
   /* SSA names in decl/type fields are a bad idea - they'll get reclaimed
      if the def vanishes.  */
   gimplify_expr (expr_p, stmt_p, NULL, is_gimple_val, fb_rvalue, false);
+  if (non_constant_p
+      && is_gimple_constant (*expr_p))
+    *expr_p = get_initialized_tmp_var (*expr_p, stmt_p, NULL, false);
 }
 
 /* Gimplify the body of statements of FNDECL and return a GIMPLE_BIND 
node

 
> 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR libgomp/83590
> 	* gimplify.c (gimplify_vla_decl): Don't call gimplify_one_sizepos
> 	for DEC_SIZE and DECL_SIZE_UNIT here...
> 	(gimplify_decl_expr): ... but here before testing if DECL_SIZE_UNIT
> 	is INTEGER_CST.
> 	(gimplify_target_expr): And here too.  Call gimplify_type_sizes
> 	always, not just for VLAs.  Check DECL_SIZE_UNIT rather than DECL_SIZE
> 	for consistency with gimplify_decl_expr.
> 
> 	* gcc.target/i386/stack-check-18.c (main): Drop const from size
> 	variable.
> 
> --- gcc/gimplify.c.jj	2018-01-03 10:19:55.887534074 +0100
> +++ gcc/gimplify.c	2018-01-11 10:10:37.733519519 +0100
> @@ -1587,9 +1587,6 @@ gimplify_vla_decl (tree decl, gimple_seq
>       for deferred expansion.  */
>    tree t, addr, ptr_type;
>  
> -  gimplify_one_sizepos (&DECL_SIZE (decl), seq_p);
> -  gimplify_one_sizepos (&DECL_SIZE_UNIT (decl), seq_p);
> -
>    /* Don't mess with a DECL_VALUE_EXPR set by the front-end.  */
>    if (DECL_HAS_VALUE_EXPR_P (decl))
>      return;
> @@ -1673,6 +1670,9 @@ gimplify_decl_expr (tree *stmt_p, gimple
>        tree init = DECL_INITIAL (decl);
>        bool is_vla = false;
>  
> +      gimplify_one_sizepos (&DECL_SIZE (decl), seq_p);
> +      gimplify_one_sizepos (&DECL_SIZE_UNIT (decl), seq_p);
> +
>        if (TREE_CODE (DECL_SIZE_UNIT (decl)) != INTEGER_CST
>  	  || (!TREE_STATIC (decl)
>  	      && flag_stack_check == GENERIC_STACK_CHECK
> @@ -6548,14 +6548,15 @@ gimplify_target_expr (tree *expr_p, gimp
>      {
>        tree cleanup = NULL_TREE;
>  
> +      if (!TYPE_SIZES_GIMPLIFIED (TREE_TYPE (temp)))
> +	gimplify_type_sizes (TREE_TYPE (temp), pre_p);
> +      gimplify_one_sizepos (&DECL_SIZE (temp), pre_p);
> +      gimplify_one_sizepos (&DECL_SIZE_UNIT (temp), pre_p);
> +
>        /* TARGET_EXPR temps aren't part of the enclosing block, so add it
>  	 to the temps list.  Handle also variable length TARGET_EXPRs.  */
> -      if (TREE_CODE (DECL_SIZE (temp)) != INTEGER_CST)
> -	{
> -	  if (!TYPE_SIZES_GIMPLIFIED (TREE_TYPE (temp)))
> -	    gimplify_type_sizes (TREE_TYPE (temp), pre_p);
> -	  gimplify_vla_decl (temp, pre_p);
> -	}
> +      if (TREE_CODE (DECL_SIZE_UNIT (temp)) != INTEGER_CST)
> +	gimplify_vla_decl (temp, pre_p);
>        else
>  	{
>  	  /* Save location where we need to place unpoisoning.  It's possible
> --- gcc/testsuite/gcc.target/i386/stack-check-18.c.jj	2018-01-03 21:21:38.707907706 +0100
> +++ gcc/testsuite/gcc.target/i386/stack-check-18.c	2018-01-11 19:10:11.933703006 +0100
> @@ -7,7 +7,7 @@ int f1 (char *);
>  int
>  f2 (void)
>  {
> -  const int size = 4096;
> +  int size = 4096;
>    char buffer[size];
>    return f1 (buffer);
>  }
> 
> 	Jakub
> 
>
Jakub Jelinek Jan. 12, 2018, 8:45 a.m. | #2
On Fri, Jan 12, 2018 at 09:16:35AM +0100, Richard Biener wrote:
> Or another workaround would be to make sure non-constant sizepos
> stay non-constant by doing sth like the following?  FEs can mark
> expressions as TREE_CONSTANT if they don't want this behavior
> for things that might optimize to constants during gimplification.

Not against that, though in that case perhaps it can be even just
+  if (is_gimple_constant (*expr_p))
+    *expr_p = get_initialized_tmp_var (*expr_p, stmt_p, NULL, false);
with a comment, because the function has an early exit for:
  if (is_gimple_sizepos (expr))
    return;

Would you be ok with that?  In that case I'd probably do a bootstrap/regtest
with statistics gathering on when this happens, dunno about Ada and other
FEs how often they do this kind of thing.

	Jakub
Richard Biener Jan. 12, 2018, 9:25 a.m. | #3
On Fri, 12 Jan 2018, Jakub Jelinek wrote:

> On Fri, Jan 12, 2018 at 09:16:35AM +0100, Richard Biener wrote:
> > Or another workaround would be to make sure non-constant sizepos
> > stay non-constant by doing sth like the following?  FEs can mark
> > expressions as TREE_CONSTANT if they don't want this behavior
> > for things that might optimize to constants during gimplification.
> 
> Not against that, though in that case perhaps it can be even just
> +  if (is_gimple_constant (*expr_p))
> +    *expr_p = get_initialized_tmp_var (*expr_p, stmt_p, NULL, false);
> with a comment, because the function has an early exit for:
>   if (is_gimple_sizepos (expr))
>     return;

But say (static const foo = 1) + 2 aka foo + 2 marked with TREE_CONSTANT
isn't is_gimple_sizepos.  But maybe we require FEs to fold TREE_CONSTANT
expressions prior to gimplification and not rely on the gimplifier here?

> Would you be ok with that?  In that case I'd probably do a bootstrap/regtest
> with statistics gathering on when this happens, dunno about Ada and other
> FEs how often they do this kind of thing.

That would certainly be interesting (also whether they'd be
TREE_CONSTANT).

is_gimple_sizepos is also somehwat suspicious as it would allow
a global VAR_DECL as valid, not just sth that is is_gimple_reg.

Richard.
Jakub Jelinek Jan. 12, 2018, 3:47 p.m. | #4
On Fri, Jan 12, 2018 at 10:25:30AM +0100, Richard Biener wrote:
> On Fri, 12 Jan 2018, Jakub Jelinek wrote:
> 
> > On Fri, Jan 12, 2018 at 09:16:35AM +0100, Richard Biener wrote:
> > > Or another workaround would be to make sure non-constant sizepos
> > > stay non-constant by doing sth like the following?  FEs can mark
> > > expressions as TREE_CONSTANT if they don't want this behavior
> > > for things that might optimize to constants during gimplification.
> > 
> > Not against that, though in that case perhaps it can be even just
> > +  if (is_gimple_constant (*expr_p))
> > +    *expr_p = get_initialized_tmp_var (*expr_p, stmt_p, NULL, false);
> > with a comment, because the function has an early exit for:
> >   if (is_gimple_sizepos (expr))
> >     return;
> 
> But say (static const foo = 1) + 2 aka foo + 2 marked with TREE_CONSTANT
> isn't is_gimple_sizepos.  But maybe we require FEs to fold TREE_CONSTANT
> expressions prior to gimplification and not rely on the gimplifier here?
> 
> > Would you be ok with that?  In that case I'd probably do a bootstrap/regtest
> > with statistics gathering on when this happens, dunno about Ada and other
> > FEs how often they do this kind of thing.
> 
> That would certainly be interesting (also whether they'd be
> TREE_CONSTANT).
> 
> is_gimple_sizepos is also somehwat suspicious as it would allow
> a global VAR_DECL as valid, not just sth that is is_gimple_reg.

So, I've bootstrapped/regtested the patch at the end of this mail together
with incremental hack:
--- gcc/gimplify.c.jj	2018-01-12 14:06:14.050276747 +0100
+++ gcc/gimplify.c	2018-01-12 14:08:27.131280662 +0100
@@ -12567,6 +12567,12 @@ gimplify_one_sizepos (tree *expr_p, gimp
 
   *expr_p = unshare_expr (expr);
 
+if (TREE_CONSTANT (*expr_p))
+{
+FILE *f = fopen ("/tmp/sizepos", "a");
+fprintf (f, "%d %s %s TREE_CONSTANT\n", (int) BITS_PER_WORD, main_input_filename ? main_input_filename : "-", current_function_name ());
+fclose (f);
+}
   /* SSA names in decl/type fields are a bad idea - they'll get reclaimed
      if the def vanishes.  */
   gimplify_expr (expr_p, stmt_p, NULL, is_gimple_val, fb_rvalue, false);
@@ -12575,7 +12581,12 @@ gimplify_one_sizepos (tree *expr_p, gimp
      is a VAR_DECL, otherwise we might handle some decls as gimplify_vla_decl
      even when they would have all sizes INTEGER_CSTs.  */
   if (is_gimple_constant (*expr_p))
+{
     *expr_p = get_initialized_tmp_var (*expr_p, stmt_p, NULL, false);
+FILE *f = fopen ("/tmp/sizepos", "a");
+fprintf (f, "%d %s %s is_gimple_constant\n", (int) BITS_PER_WORD, main_input_filename ? main_input_filename : "-", current_function_name ());
+fclose (f);
+}
 }
 
 /* Gimplify the body of statements of FNDECL and return a GIMPLE_BIND node

In a few C testcases the cases with TREE_CONSTANT before gimplify_expr are
stuff like:
extern void dynreplace_trampoline(void);
extern void dynreplace_trampoline_endlabel(void);
int dynreplace_add_trampoline(void)
{
  unsigned long trampoline_code[(((unsigned long) (&(dynreplace_trampoline_endlabel))-(unsigned long) (&dynreplace_trampoline)))];
}
and similar, for C is_gimple_constant after, i.e. what the patch changes, is
those VLAs that use const vars in the expressions.  Changing that is perhaps
acceptable.  On the other side, the amount of Ada changes is significantly
higher.  Perhaps do
  if (is_gimple_constant (*expr_p)
      && (flag_openmp || flag_openacc || flag_openmp_simd))
, that way it will never affect Ada.

Results of this below.
grep 'is_gimple_constant$' /tmp/sizepos | wc -l
4050
grep 'CONSTANT$' /tmp/sizepos | wc -l
3264
sort /tmp/sizepos  | uniq -c | sort -nr
    106 64 cxg2009.adb cxg2009 TREE_CONSTANT
    106 64 cxg2009.adb cxg2009 is_gimple_constant
     96 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/bounds-1.c main is_gimple_constant
     96 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/bounds-1.c main is_gimple_constant
     74 64 cxg2021.adb cxg2021 TREE_CONSTANT
     74 64 cxg2021.adb cxg2021 is_gimple_constant
     74 64 cxg2020.adb cxg2020 TREE_CONSTANT
     74 64 cxg2020.adb cxg2020 is_gimple_constant
     74 64 cxg2019.adb cxg2019 TREE_CONSTANT
     74 64 cxg2019.adb cxg2019 is_gimple_constant
     74 64 cxg2018.adb cxg2018 TREE_CONSTANT
     74 64 cxg2018.adb cxg2018 is_gimple_constant
     60 64 a74106b.adb a74106b TREE_CONSTANT
     60 64 a74106b.adb a74106b is_gimple_constant
     48 64 /home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/20000923-1.c foo is_gimple_constant
     48 32 /home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/20000923-1.c foo is_gimple_constant
     46 64 cxg2008.adb cxg2008 TREE_CONSTANT
     46 64 cxg2008.adb cxg2008 is_gimple_constant
     46 64 cxg2002.adb cxg2002 TREE_CONSTANT
     46 64 cxg2002.adb cxg2002 is_gimple_constant
     42 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/vla-2.c main is_gimple_constant
     42 64 cxg2010.adb cxg2010 TREE_CONSTANT
     42 64 cxg2010.adb cxg2010 is_gimple_constant
     42 64 cxg2007.adb cxg2007 TREE_CONSTANT
     42 64 cxg2007.adb cxg2007 is_gimple_constant
     42 64 cxg2006.adb cxg2006 TREE_CONSTANT
     42 64 cxg2006.adb cxg2006 is_gimple_constant
     42 64 cxg2003.adb cxg2003 TREE_CONSTANT
     42 64 cxg2003.adb cxg2003 is_gimple_constant
     42 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/vla-2.c main is_gimple_constant
     38 64 cxg2017.adb cxg2017 TREE_CONSTANT
     38 64 cxg2017.adb cxg2017 is_gimple_constant
     38 64 cxg2016.adb cxg2016 TREE_CONSTANT
     38 64 cxg2016.adb cxg2016 is_gimple_constant
     38 64 cxg2015.adb cxg2015 TREE_CONSTANT
     38 64 cxg2015.adb cxg2015 is_gimple_constant
     38 64 cxg2014.adb cxg2014 TREE_CONSTANT
     38 64 cxg2014.adb cxg2014 is_gimple_constant
     38 64 cxg2013.adb cxg2013 TREE_CONSTANT
     38 64 cxg2013.adb cxg2013 is_gimple_constant
     38 64 cxg2012.adb cxg2012 TREE_CONSTANT
     38 64 cxg2012.adb cxg2012 is_gimple_constant
     38 64 cxg2011.adb cxg2011 TREE_CONSTANT
     38 64 cxg2011.adb cxg2011 is_gimple_constant
     38 64 cxg2004.adb cxg2004 TREE_CONSTANT
     38 64 cxg2004.adb cxg2004 is_gimple_constant
     38 64 cxg2001.adb cxg2001 TREE_CONSTANT
     38 64 cxg2001.adb cxg2001 is_gimple_constant
     38 64 cc1222a.adb cc1222a TREE_CONSTANT
     38 64 cc1222a.adb cc1222a is_gimple_constant
     36 64 cxg1005.adb cxg1005 TREE_CONSTANT
     36 64 cxg1005.adb cxg1005 is_gimple_constant
     36 64 cxg1004.adb cxg1004 TREE_CONSTANT
     36 64 cxg1004.adb cxg1004 is_gimple_constant
     36 64 c43004a.adb c43004a TREE_CONSTANT
     36 64 c43004a.adb c43004a is_gimple_constant
     35 64 /home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/vla-const-1.c f TREE_CONSTANT
     35 64 /home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c dynreplace_add_trampoline TREE_CONSTANT
     35 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/pr71512-1.c DrawChunk is_gimple_constant
     35 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c Run is_gimple_constant
     35 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/clone-test-1.c main is_gimple_constant
     35 32 /home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/vla-const-1.c f TREE_CONSTANT
     35 32 /home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c dynreplace_add_trampoline TREE_CONSTANT
     35 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/pr71512-1.c DrawChunk is_gimple_constant
     35 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c Run is_gimple_constant
     35 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/clone-test-1.c main is_gimple_constant
     34 64 cc3232a.adb cc3232a TREE_CONSTANT
     34 64 cc3232a.adb cc3232a is_gimple_constant
     30 64 cxaa009.adb cxaa009 TREE_CONSTANT
     30 64 cxaa009.adb cxaa009 is_gimple_constant
     28 64 cc3601a.adb cc3601a TREE_CONSTANT
     28 64 cc3601a.adb cc3601a is_gimple_constant
     28 64 c52005e.adb c52005e TREE_CONSTANT
     28 64 c52005e.adb c52005e is_gimple_constant
     28 64 c52005b.adb c52005b TREE_CONSTANT
     28 64 c52005b.adb c52005b is_gimple_constant
     24 64 cxg1003.adb cxg1003 TREE_CONSTANT
     24 64 cxg1003.adb cxg1003 is_gimple_constant
     24 64 c64103b.adb c64103b TREE_CONSTANT
     24 64 c64103b.adb c64103b is_gimple_constant
     24 64 c49025a.adb c49025a TREE_CONSTANT
     24 64 c49025a.adb c49025a is_gimple_constant
     24 64 c47005a.adb c47005a TREE_CONSTANT
     24 64 c47005a.adb c47005a is_gimple_constant
     24 64 c45242b.adb c45242b TREE_CONSTANT
     24 64 c45242b.adb c45242b is_gimple_constant
     24 64 c35801d.adb c35801d TREE_CONSTANT
     24 64 c35801d.adb c35801d is_gimple_constant
     24 64 c35704c.adb c35704c TREE_CONSTANT
     24 64 c35704c.adb c35704c is_gimple_constant
     24 64 c35704b.adb c35704b TREE_CONSTANT
     24 64 c35704b.adb c35704b is_gimple_constant
     24 64 a35801f.adb a35801f TREE_CONSTANT
     24 64 a35801f.adb a35801f is_gimple_constant
     22 64 cc3125c.adb cc3125c TREE_CONSTANT
     22 64 cc3125c.adb cc3125c is_gimple_constant
     22 64 cc1111a.adb cc1111a TREE_CONSTANT
     22 64 cc1111a.adb cc1111a is_gimple_constant
     20 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c99-const-expr-12.c f is_gimple_constant
     20 64 cxg1002.adb cxg1002 TREE_CONSTANT
     20 64 cxg1002.adb cxg1002 is_gimple_constant
     20 64 cxg1001.adb cxg1001 TREE_CONSTANT
     20 64 cxg1001.adb cxg1001 is_gimple_constant
     20 64 cxa5a10.adb cxa5a10 TREE_CONSTANT
     20 64 cxa5a10.adb cxa5a10 is_gimple_constant
     20 64 cxa5a09.adb cxa5a09 TREE_CONSTANT
     20 64 cxa5a09.adb cxa5a09 is_gimple_constant
     20 64 cxa5a08.adb cxa5a08 TREE_CONSTANT
     20 64 cxa5a08.adb cxa5a08 is_gimple_constant
     20 64 cxa5a07.adb cxa5a07 TREE_CONSTANT
     20 64 cxa5a07.adb cxa5a07 is_gimple_constant
     20 64 cxa5a06.adb cxa5a06 TREE_CONSTANT
     20 64 cxa5a06.adb cxa5a06 is_gimple_constant
     20 64 cxa5a05.adb cxa5a05 TREE_CONSTANT
     20 64 cxa5a05.adb cxa5a05 is_gimple_constant
     20 64 cxa5a04.adb cxa5a04 TREE_CONSTANT
     20 64 cxa5a04.adb cxa5a04 is_gimple_constant
     20 64 cxa5a03.adb cxa5a03 TREE_CONSTANT
     20 64 cxa5a03.adb cxa5a03 is_gimple_constant
     20 64 cxa5a02.adb cxa5a02 TREE_CONSTANT
     20 64 cxa5a02.adb cxa5a02 is_gimple_constant
     20 64 cxa5a01.adb cxa5a01 TREE_CONSTANT
     20 64 cxa5a01.adb cxa5a01 is_gimple_constant
     20 64 cc3222a.adb cc3222a TREE_CONSTANT
     20 64 cc3222a.adb cc3222a is_gimple_constant
     20 64 c34003c.adb c34003c TREE_CONSTANT
     20 64 c34003c.adb c34003c is_gimple_constant
     20 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c99-const-expr-12.c f is_gimple_constant
     18 64 cc3016b.adb cc3016b TREE_CONSTANT
     18 64 cc3016b.adb cc3016b is_gimple_constant
     18 64 c87b23a.adb c87b23a TREE_CONSTANT
     18 64 c87b23a.adb c87b23a is_gimple_constant
     18 64 c49026a.adb c49026a TREE_CONSTANT
     18 64 c49026a.adb c49026a is_gimple_constant
     18 64 c32001a.adb c32001a TREE_CONSTANT
     18 64 c32001a.adb c32001a is_gimple_constant
     17 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/enum-incomplete-3.c foo is_gimple_constant
     17 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/enum-incomplete-3.c foo is_gimple_constant
     16 64 s-rannum.adb system.random_numbers.random TREE_CONSTANT
     16 64 s-rannum.adb system.random_numbers.random is_gimple_constant
     16 64 s-rannum.adb system.random_numbers.random.f TREE_CONSTANT
     16 64 s-rannum.adb system.random_numbers.random.f is_gimple_constant
     16 64 g-forstr.adb gnat.formatted_string."&" TREE_CONSTANT
     16 64 g-forstr.adb gnat.formatted_string."&" is_gimple_constant
     16 64 g-forstr.adb gnat.formatted_string."&".float_format TREE_CONSTANT
     16 64 g-forstr.adb gnat.formatted_string."&".float_format is_gimple_constant
     16 64 cxa5015.adb cxa5015 TREE_CONSTANT
     16 64 cxa5015.adb cxa5015 is_gimple_constant
     16 64 c49023a.adb c49023a TREE_CONSTANT
     16 64 c49023a.adb c49023a is_gimple_constant
     16 64 c38102b.adb c38102b TREE_CONSTANT
     16 64 c38102b.adb c38102b is_gimple_constant
     16 64 c35704d.adb c35704d TREE_CONSTANT
     16 64 c35704d.adb c35704d is_gimple_constant
     16 32 s-rannum.adb system.random_numbers.random TREE_CONSTANT
     16 32 s-rannum.adb system.random_numbers.random is_gimple_constant
     16 32 s-rannum.adb system.random_numbers.random.f TREE_CONSTANT
     16 32 s-rannum.adb system.random_numbers.random.f is_gimple_constant
     16 32 g-forstr.adb gnat.formatted_string."&" TREE_CONSTANT
     16 32 g-forstr.adb gnat.formatted_string."&" is_gimple_constant
     16 32 g-forstr.adb gnat.formatted_string."&".float_format TREE_CONSTANT
     16 32 g-forstr.adb gnat.formatted_string."&".float_format is_gimple_constant
     14 64 la140052.adb la140052 TREE_CONSTANT
     14 64 la140052.adb la140052 is_gimple_constant
     14 64 cxg2005.adb cxg2005 TREE_CONSTANT
     14 64 cxg2005.adb cxg2005 is_gimple_constant
     14 64 ce3806c.adb ce3806c TREE_CONSTANT
     14 64 ce3806c.adb ce3806c is_gimple_constant
     14 64 ce3804f.adb ce3804f TREE_CONSTANT
     14 64 ce3804f.adb ce3804f is_gimple_constant
     14 64 cd2c11a.adb cd2c11a TREE_CONSTANT
     14 64 cd2c11a.adb cd2c11a is_gimple_constant
     14 64 cd10002.adb cd10002 TREE_CONSTANT
     14 64 cd10002.adb cd10002 is_gimple_constant
     14 64 c85018b.adb c85018b TREE_CONSTANT
     14 64 c85018b.adb c85018b is_gimple_constant
     14 64 c74302b.adb c74302b TREE_CONSTANT
     14 64 c74302b.adb c74302b is_gimple_constant
     14 64 c3a0010.adb c3a0010 TREE_CONSTANT
     14 64 c3a0010.adb c3a0010 is_gimple_constant
     14 64 c3a0003.adb c3a0003 TREE_CONSTANT
     14 64 c3a0003.adb c3a0003 is_gimple_constant
     14 64 c32111b.adb c32111b TREE_CONSTANT
     14 64 c32111b.adb c32111b is_gimple_constant
     14 64 c32111a.adb c32111a TREE_CONSTANT
     14 64 c32111a.adb c32111a is_gimple_constant
     12 64 cc51006.adb cc51006 TREE_CONSTANT
     12 64 cc51006.adb cc51006 is_gimple_constant
     12 64 c87b34b.adb c87b34b TREE_CONSTANT
     12 64 c87b34b.adb c87b34b is_gimple_constant
     12 64 c87b10a.adb c87b10a TREE_CONSTANT
     12 64 c87b10a.adb c87b10a is_gimple_constant
     12 64 c87b09c.adb c87b09c TREE_CONSTANT
     12 64 c87b09c.adb c87b09c is_gimple_constant
     12 64 c87b09a.adb c87b09a TREE_CONSTANT
     12 64 c87b09a.adb c87b09a is_gimple_constant
     12 64 c83051a.adb c83051a TREE_CONSTANT
     12 64 c83051a.adb c83051a is_gimple_constant
     12 64 c47002b.adb c47002b TREE_CONSTANT
     12 64 c47002b.adb c47002b is_gimple_constant
     12 64 c46021a.adb c46021a TREE_CONSTANT
     12 64 c46021a.adb c46021a is_gimple_constant
     12 64 c460008.adb c460008 TREE_CONSTANT
     12 64 c460008.adb c460008 is_gimple_constant
     12 64 c3a0015.adb c3a0015 TREE_CONSTANT
     12 64 c3a0015.adb c3a0015 is_gimple_constant
     12 64 c38102e.adb c38102e.proc TREE_CONSTANT
     12 64 c38102e.adb c38102e.proc is_gimple_constant
     12 64 c35703a.adb c35703a TREE_CONSTANT
     12 64 c35703a.adb c35703a is_gimple_constant
     12 64 c34003a.adb c34003a TREE_CONSTANT
     12 64 c34003a.adb c34003a is_gimple_constant
     10 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/combined-directives-1.c main is_gimple_constant
     10 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr25682.c foo is_gimple_constant
     10 64 ce3810a.adb ce3810a TREE_CONSTANT
     10 64 ce3810a.adb ce3810a is_gimple_constant
     10 64 ce3809a.adb ce3809a TREE_CONSTANT
     10 64 ce3809a.adb ce3809a is_gimple_constant
     10 64 ce3806e.adb ce3806e TREE_CONSTANT
     10 64 ce3806e.adb ce3806e is_gimple_constant
     10 64 ce3806d.adb ce3806d TREE_CONSTANT
     10 64 ce3806d.adb ce3806d is_gimple_constant
     10 64 ce3804i.adb ce3804i TREE_CONSTANT
     10 64 ce3804i.adb ce3804i is_gimple_constant
     10 64 ce3804g.adb ce3804g TREE_CONSTANT
     10 64 ce3804g.adb ce3804g is_gimple_constant
     10 64 ce3804d.adb ce3804d TREE_CONSTANT
     10 64 ce3804d.adb ce3804d is_gimple_constant
     10 64 ce3804a.adb ce3804a TREE_CONSTANT
     10 64 ce3804a.adb ce3804a is_gimple_constant
     10 64 ce3801a.adb ce3801a TREE_CONSTANT
     10 64 ce3801a.adb ce3801a is_gimple_constant
     10 64 c87b41a.adb c87b41a TREE_CONSTANT
     10 64 c87b41a.adb c87b41a is_gimple_constant
     10 64 c87b08a.adb c87b08a TREE_CONSTANT
     10 64 c87b08a.adb c87b08a is_gimple_constant
     10 64 c45252b.adb c45252b TREE_CONSTANT
     10 64 c45252b.adb c45252b is_gimple_constant
     10 64 c392002.adb c392002 TREE_CONSTANT
     10 64 c392002.adb c392002 is_gimple_constant
     10 64 c38102e.adb c38102e TREE_CONSTANT
     10 64 c38102e.adb c38102e is_gimple_constant
     10 64 c35003d.adb c35003d TREE_CONSTANT
     10 64 c35003d.adb c35003d is_gimple_constant
     10 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/combined-directives-1.c main is_gimple_constant
     10 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr25682.c foo is_gimple_constant
      9 64 c87b04b.adb c87b04b TREE_CONSTANT
      9 64 c87b04b.adb c87b04b is_gimple_constant
      9 64 c34011b.adb c34011b TREE_CONSTANT
      9 64 c34011b.adb c34011b is_gimple_constant
      8 64 s-fatsfl.ads system.fat_sflt.attr_short_float.valid TREE_CONSTANT
      8 64 s-fatsfl.ads system.fat_sflt.attr_short_float.valid is_gimple_constant
      8 64 s-fatllf.ads system.fat_llf.attr_long_long_float.valid TREE_CONSTANT
      8 64 s-fatllf.ads system.fat_llf.attr_long_long_float.valid is_gimple_constant
      8 64 s-fatlfl.ads system.fat_lflt.attr_long_float.valid TREE_CONSTANT
      8 64 s-fatlfl.ads system.fat_lflt.attr_long_float.valid is_gimple_constant
      8 64 s-fatflt.ads system.fat_flt.attr_float.valid TREE_CONSTANT
      8 64 s-fatflt.ads system.fat_flt.attr_float.valid is_gimple_constant
      8 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-user-1.c main is_gimple_constant
      8 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/gomp/pr47963.c foo is_gimple_constant
      8 64 cda201b.adb cda201b TREE_CONSTANT
      8 64 cda201b.adb cda201b is_gimple_constant
      8 64 cc3305c.adb cc3305c TREE_CONSTANT
      8 64 cc3305c.adb cc3305c is_gimple_constant
      8 64 cc1311b.adb cc1311b TREE_CONSTANT
      8 64 cc1311b.adb cc1311b is_gimple_constant
      8 64 c87b30a.adb c87b30a TREE_CONSTANT
      8 64 c87b30a.adb c87b30a is_gimple_constant
      8 64 c87b18b.adb c87b18b TREE_CONSTANT
      8 64 c87b18b.adb c87b18b is_gimple_constant
      8 64 c3a0015.adb c3a0015.std.check3 TREE_CONSTANT
      8 64 c3a0015.adb c3a0015.std.check3 is_gimple_constant
      8 64 c3a0015.adb c3a0015.std.check2 TREE_CONSTANT
      8 64 c3a0015.adb c3a0015.std.check2 is_gimple_constant
      8 64 c3a0015.adb c3a0015.std.check1 TREE_CONSTANT
      8 64 c3a0015.adb c3a0015.std.check1 is_gimple_constant
      8 32 s-fatsfl.ads system.fat_sflt.attr_short_float.valid TREE_CONSTANT
      8 32 s-fatsfl.ads system.fat_sflt.attr_short_float.valid is_gimple_constant
      8 32 s-fatllf.ads system.fat_llf.attr_long_long_float.valid TREE_CONSTANT
      8 32 s-fatllf.ads system.fat_llf.attr_long_long_float.valid is_gimple_constant
      8 32 s-fatlfl.ads system.fat_lflt.attr_long_float.valid TREE_CONSTANT
      8 32 s-fatlfl.ads system.fat_lflt.attr_long_float.valid is_gimple_constant
      8 32 s-fatflt.ads system.fat_flt.attr_float.valid TREE_CONSTANT
      8 32 s-fatflt.ads system.fat_flt.attr_float.valid is_gimple_constant
      8 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/gomp/pr47963.c foo is_gimple_constant
      7 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/array-5.c func is_gimple_constant
      7 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/array-5.c func is_gimple_constant
      6 64 ../../../../libgomp/testsuite/libgomp.c/examples-4/target_data-3.c main is_gimple_constant
      6 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/ice_type.adb ice_type TREE_CONSTANT
      6 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/ice_type.adb ice_type is_gimple_constant
      6 64 cxac004.adb cxac004 TREE_CONSTANT
      6 64 cxac004.adb cxac004 is_gimple_constant
      6 64 cd7305a.adb cd7305a TREE_CONSTANT
      6 64 cd7305a.adb cd7305a is_gimple_constant
      6 64 cd5014e.adb cd5014e TREE_CONSTANT
      6 64 cd5014e.adb cd5014e is_gimple_constant
      6 64 cd5013e.adb cd5013e TREE_CONSTANT
      6 64 cd5013e.adb cd5013e is_gimple_constant
      6 64 cd1c03f.adb cd1c03f TREE_CONSTANT
      6 64 cd1c03f.adb cd1c03f is_gimple_constant
      6 64 c974014.adb c974014 TREE_CONSTANT
      6 64 c974014.adb c974014 is_gimple_constant
      6 64 c95092a.adb c95092a TREE_CONSTANT
      6 64 c95092a.adb c95092a is_gimple_constant
      6 64 c87b54a.adb c87b54a TREE_CONSTANT
      6 64 c87b54a.adb c87b54a is_gimple_constant
      6 64 c87b06a.adb c87b06a TREE_CONSTANT
      6 64 c87b06a.adb c87b06a is_gimple_constant
      6 64 c74004a.adb c74004a TREE_CONSTANT
      6 64 c74004a.adb c74004a is_gimple_constant
      6 64 c72002a.adb c72002a TREE_CONSTANT
      6 64 c72002a.adb c72002a is_gimple_constant
      6 64 c4a013a.adb c4a013a TREE_CONSTANT
      6 64 c4a013a.adb c4a013a is_gimple_constant
      6 64 c4a011a.adb c4a011a TREE_CONSTANT
      6 64 c4a011a.adb c4a011a is_gimple_constant
      6 64 c49024a.adb c49024a TREE_CONSTANT
      6 64 c49024a.adb c49024a is_gimple_constant
      6 64 c47009b.adb c47009b TREE_CONSTANT
      6 64 c47009b.adb c47009b is_gimple_constant
      6 64 c46032a.adb c46032a TREE_CONSTANT
      6 64 c46032a.adb c46032a is_gimple_constant
      6 64 c46024a.adb c46024a TREE_CONSTANT
      6 64 c46024a.adb c46024a is_gimple_constant
      6 64 c45624b.adb c45624b TREE_CONSTANT
      6 64 c45624b.adb c45624b is_gimple_constant
      6 64 c45624a.adb c45624a TREE_CONSTANT
      6 64 c45624a.adb c45624a is_gimple_constant
      6 64 c45622a.adb c45622a TREE_CONSTANT
      6 64 c45622a.adb c45622a is_gimple_constant
      6 64 c456001.adb c456001 TREE_CONSTANT
      6 64 c456001.adb c456001 is_gimple_constant
      6 64 c45523a.adb c45523a TREE_CONSTANT
      6 64 c45523a.adb c45523a is_gimple_constant
      6 64 c45323a.adb c45323a TREE_CONSTANT
      6 64 c45323a.adb c45323a is_gimple_constant
      6 64 c45322a.adb c45322a TREE_CONSTANT
      6 64 c45322a.adb c45322a is_gimple_constant
      6 64 c44003d.adb c44003d TREE_CONSTANT
      6 64 c44003d.adb c44003d is_gimple_constant
      6 64 c41323a.adb c41323a TREE_CONSTANT
      6 64 c41323a.adb c41323a is_gimple_constant
      6 64 c392003.adb c392003 TREE_CONSTANT
      6 64 c392003.adb c392003 is_gimple_constant
      6 64 c37009a.adb c37009a TREE_CONSTANT
      6 64 c37009a.adb c37009a is_gimple_constant
      6 64 c2a008a.adb c2a008a TREE_CONSTANT
      6 64 c2a008a.adb c2a008a is_gimple_constant
      6 64 c24207a.adb c24207a TREE_CONSTANT
      6 64 c24207a.adb c24207a is_gimple_constant
      6 64 c24203b.adb c24203b TREE_CONSTANT
      6 64 c24203b.adb c24203b is_gimple_constant
      6 32 ../../../../libgomp/testsuite/libgomp.c/examples-4/target_data-3.c main is_gimple_constant
      5 64 /tmp/cgo-gcc-input-048096209.c testSendSIG is_gimple_constant
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/zero_length_subarrays.c main is_gimple_constant
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-4.c test_reductions is_gimple_constant
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c test_reductions_minmax is_gimple_cotant
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c test_reductions is_gimple_constant
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c test_reductions_minmax is_gimple_constant
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c test_reductions is_gimple_constant
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions_minmax is_gimple_constant
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions is_gimple_constant
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions_bool is_gimple_constant
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/pr70688.c main is_gimple_constant
      5 64 issue3250.cgo2.c testSendSIG is_gimple_constant
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/stack-check-18.c f2 is_gimple_constant
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr50527.c main is_gimple_constant
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr47086.c foo is_gimple_constant
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr44545.c DrawChunk is_gimple_constant
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr43513.c foo3 is_gimple_constant
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/graphite/pr83277.c wv is_gimple_constant
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/graphite/pr83255.c main is_gimple_constant
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c99-const-expr-13.c f TREE_CONSTANT
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c90-const-expr-6.c f is_gimple_constant
      5 32 /tmp/cgo-gcc-input-268957210.c testSendSIG is_gimple_constant
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/zero_length_subarrays.c main is_gimple_constant
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-4.c test_reductions is_gimple_constant
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c test_reductions_minmax is_gimple_constant
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c test_reductions is_gimple_constant
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c test_reductions_minmax is_gimple_constant
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c test_reductions is_gimple_constant
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions_minmax is_gimple_constant
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions is_gimple_constant
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions_bool is_gimple_constant
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/pr70688.c main is_gimple_constant
      5 32 issue3250.cgo2.c testSendSIG is_gimple_constant
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/stack-check-18.c f2 is_gimple_constant
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr50527.c main is_gimple_constant
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr47086.c foo is_gimple_constant
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr44545.c DrawChunk is_gimple_constant
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr43513.c foo3 is_gimple_constant
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c99-const-expr-13.c f TREE_CONSTANT
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c90-const-expr-6.c f is_gimple_constant
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/unchecked_convert7.adb unchecked_convert7 TREE_CONSTANT
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/unchecked_convert7.adb unchecked_convert7 is_gimple_constant
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2_pkg.adb inline2_pkg.valid_real TREE_CONSTANT
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2_pkg.adb inline2_pkg.valid_real is_gimple_constant
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2_pkg.adb inline2_pkg.invalid_real TREE_CONSTANT
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2_pkg.adb inline2_pkg.invalid_real is_gimple_constant
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2.adb inline2_pkg.valid_real TREE_CONSTANT
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2.adb inline2_pkg.valid_real is_gimple_constant
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2.adb inline2_pkg.invalid_real TREE_CONSTANT
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2.adb inline2_pkg.invalid_real is_gimple_constant
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline1.adb inline1_pkg.valid_real TREE_CONSTANT
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline1.adb inline1_pkg.valid_real is_gimple_constant
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline1.adb inline1_pkg.invalid_real TREE_CONSTANT
      4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline1.adb inline1_pkg.invalid_real is_gimple_constant
      4 64 ce3815a.adb ce3815a TREE_CONSTANT
      4 64 ce3815a.adb ce3815a is_gimple_constant
      4 64 ce3806a.adb ce3806a TREE_CONSTANT
      4 64 ce3806a.adb ce3806a is_gimple_constant
      4 64 ce3805a.adb ce3805a TREE_CONSTANT
      4 64 ce3805a.adb ce3805a is_gimple_constant
      4 64 ce3804m.adb ce3804m TREE_CONSTANT
      4 64 ce3804m.adb ce3804m is_gimple_constant
      4 64 ce3804c.adb ce3804c TREE_CONSTANT
      4 64 ce3804c.adb ce3804c is_gimple_constant
      4 64 ce2401e.adb ce2401e TREE_CONSTANT
      4 64 ce2401e.adb ce2401e is_gimple_constant
      4 64 ce2201c.adb ce2201c TREE_CONSTANT
      4 64 ce2201c.adb ce2201c is_gimple_constant
      4 64 cc1222a.adb cc1222a.B_1.p2 TREE_CONSTANT
      4 64 cc1222a.adb cc1222a.B_1.p2 is_gimple_constant
      4 64 cc1222a.adb cc1222a.B_1.p1 TREE_CONSTANT
      4 64 cc1222a.adb cc1222a.B_1.p1 is_gimple_constant
      4 64 ca140232.adb ca140232.max_data_val TREE_CONSTANT
      4 64 ca140232.adb ca140232.max_data_val is_gimple_constant
      4 64 c87b47a.adb c87b47a TREE_CONSTANT
      4 64 c87b47a.adb c87b47a is_gimple_constant
      4 64 c87b42a.adb c87b42a TREE_CONSTANT
      4 64 c87b42a.adb c87b42a is_gimple_constant
      4 64 c87b34c.adb c87b34c TREE_CONSTANT
      4 64 c87b34c.adb c87b34c is_gimple_constant
      4 64 c87b07b.adb c87b07b TREE_CONSTANT
      4 64 c87b07b.adb c87b07b is_gimple_constant
      4 64 c83029a.adb c83029a TREE_CONSTANT
      4 64 c83029a.adb c83029a is_gimple_constant
      4 64 c83028a.adb c83028a TREE_CONSTANT
      4 64 c83028a.adb c83028a is_gimple_constant
      4 64 c83025a.adb c83025a TREE_CONSTANT
      4 64 c83025a.adb c83025a is_gimple_constant
      4 64 c83024a.adb c83024a TREE_CONSTANT
      4 64 c83024a.adb c83024a is_gimple_constant
      4 64 c83023a.adb c83023a TREE_CONSTANT
      4 64 c83023a.adb c83023a is_gimple_constant
      4 64 c83022g0m.adb c83022g0m TREE_CONSTANT
      4 64 c83022g0m.adb c83022g0m is_gimple_constant
      4 64 c83022a.adb c83022a TREE_CONSTANT
      4 64 c83022a.adb c83022a is_gimple_constant
      4 64 c35801d.adb c35801d.np3 TREE_CONSTANT
      4 64 c35801d.adb c35801d.np3 is_gimple_constant
      4 64 c35801d.adb c35801d.np2 TREE_CONSTANT
      4 64 c35801d.adb c35801d.np2 is_gimple_constant
      4 64 c35801d.adb c35801d.np1 TREE_CONSTANT
      4 64 c35801d.adb c35801d.np1 is_gimple_constant
      4 64 c35704a.adb c35704a TREE_CONSTANT
      4 64 c35704a.adb c35704a is_gimple_constant
      4 64 c34005c.adb c34005c TREE_CONSTANT
      4 64 c34005c.adb c34005c is_gimple_constant
      4 64 c34005a.adb c34005a TREE_CONSTANT
      4 64 c34005a.adb c34005a is_gimple_constant
      4 64 ada101a.adb ada101a TREE_CONSTANT
      4 64 ada101a.adb ada101a is_gimple_constant

2018-01-12  Jakub Jelinek  <jakub@redhat.com>
	    Richard Biener  <rguenth@suse.de>

	PR libgomp/83590
	* gimplify.c (gimplify_one_sizepos): Make sure gimplify_one_sizepos
	doesn't turn something previously non-INTEGER_CST into INTEGER_CST.

--- gcc/gimplify.c.jj	2018-01-11 20:34:15.373975356 +0100
+++ gcc/gimplify.c	2018-01-12 13:57:21.153274727 +0100
@@ -12570,6 +12570,12 @@ gimplify_one_sizepos (tree *expr_p, gimp
   /* SSA names in decl/type fields are a bad idea - they'll get reclaimed
      if the def vanishes.  */
   gimplify_expr (expr_p, stmt_p, NULL, is_gimple_val, fb_rvalue, false);
+
+  /* If expr wasn't already is_gimple_sizepos from the FE, ensure that it
+     is a VAR_DECL, otherwise we might handle some decls as gimplify_vla_decl
+     even when they would have all sizes INTEGER_CSTs.  */
+  if (is_gimple_constant (*expr_p))
+    *expr_p = get_initialized_tmp_var (*expr_p, stmt_p, NULL, false);
 }
 
 /* Gimplify the body of statements of FNDECL and return a GIMPLE_BIND node


	Jakub
Richard Biener Jan. 12, 2018, 4:45 p.m. | #5
On January 12, 2018 4:47:41 PM GMT+01:00, Jakub Jelinek <jakub@redhat.com> wrote:
>On Fri, Jan 12, 2018 at 10:25:30AM +0100, Richard Biener wrote:
>> On Fri, 12 Jan 2018, Jakub Jelinek wrote:
>> 
>> > On Fri, Jan 12, 2018 at 09:16:35AM +0100, Richard Biener wrote:
>> > > Or another workaround would be to make sure non-constant sizepos
>> > > stay non-constant by doing sth like the following?  FEs can mark
>> > > expressions as TREE_CONSTANT if they don't want this behavior
>> > > for things that might optimize to constants during
>gimplification.
>> > 
>> > Not against that, though in that case perhaps it can be even just
>> > +  if (is_gimple_constant (*expr_p))
>> > +    *expr_p = get_initialized_tmp_var (*expr_p, stmt_p, NULL,
>false);
>> > with a comment, because the function has an early exit for:
>> >   if (is_gimple_sizepos (expr))
>> >     return;
>> 
>> But say (static const foo = 1) + 2 aka foo + 2 marked with
>TREE_CONSTANT
>> isn't is_gimple_sizepos.  But maybe we require FEs to fold
>TREE_CONSTANT
>> expressions prior to gimplification and not rely on the gimplifier
>here?
>> 
>> > Would you be ok with that?  In that case I'd probably do a
>bootstrap/regtest
>> > with statistics gathering on when this happens, dunno about Ada and
>other
>> > FEs how often they do this kind of thing.
>> 
>> That would certainly be interesting (also whether they'd be
>> TREE_CONSTANT).
>> 
>> is_gimple_sizepos is also somehwat suspicious as it would allow
>> a global VAR_DECL as valid, not just sth that is is_gimple_reg.
>
>So, I've bootstrapped/regtested the patch at the end of this mail
>together
>with incremental hack:
>--- gcc/gimplify.c.jj	2018-01-12 14:06:14.050276747 +0100
>+++ gcc/gimplify.c	2018-01-12 14:08:27.131280662 +0100
>@@ -12567,6 +12567,12 @@ gimplify_one_sizepos (tree *expr_p, gimp
> 
>   *expr_p = unshare_expr (expr);
> 
>+if (TREE_CONSTANT (*expr_p))
>+{
>+FILE *f = fopen ("/tmp/sizepos", "a");
>+fprintf (f, "%d %s %s TREE_CONSTANT\n", (int) BITS_PER_WORD,
>main_input_filename ? main_input_filename : "-", current_function_name
>());
>+fclose (f);
>+}
>/* SSA names in decl/type fields are a bad idea - they'll get reclaimed
>      if the def vanishes.  */
> gimplify_expr (expr_p, stmt_p, NULL, is_gimple_val, fb_rvalue, false);
>@@ -12575,7 +12581,12 @@ gimplify_one_sizepos (tree *expr_p, gimp
>is a VAR_DECL, otherwise we might handle some decls as
>gimplify_vla_decl
>      even when they would have all sizes INTEGER_CSTs.  */
>   if (is_gimple_constant (*expr_p))
>+{
>     *expr_p = get_initialized_tmp_var (*expr_p, stmt_p, NULL, false);
>+FILE *f = fopen ("/tmp/sizepos", "a");
>+fprintf (f, "%d %s %s is_gimple_constant\n", (int) BITS_PER_WORD,
>main_input_filename ? main_input_filename : "-", current_function_name
>());
>+fclose (f);
>+}
> }
> 
>/* Gimplify the body of statements of FNDECL and return a GIMPLE_BIND
>node
>
>In a few C testcases the cases with TREE_CONSTANT before gimplify_expr
>are
>stuff like:
>extern void dynreplace_trampoline(void);
>extern void dynreplace_trampoline_endlabel(void);
>int dynreplace_add_trampoline(void)
>{
>unsigned long trampoline_code[(((unsigned long)
>(&(dynreplace_trampoline_endlabel))-(unsigned long)
>(&dynreplace_trampoline)))];
>}
>and similar, for C is_gimple_constant after, i.e. what the patch
>changes, is
>those VLAs that use const vars in the expressions.  Changing that is
>perhaps
>acceptable.  On the other side, the amount of Ada changes is
>significantly
>higher.  Perhaps do
>  if (is_gimple_constant (*expr_p)
>      && (flag_openmp || flag_openacc || flag_openmp_simd))
>, that way it will never affect Ada.

So what about not doing the temp var if the expr was TREE_CONSTANT? 

Richard. 

>Results of this below.
>grep 'is_gimple_constant$' /tmp/sizepos | wc -l
>4050
>grep 'CONSTANT$' /tmp/sizepos | wc -l
>3264
>sort /tmp/sizepos  | uniq -c | sort -nr
>    106 64 cxg2009.adb cxg2009 TREE_CONSTANT
>    106 64 cxg2009.adb cxg2009 is_gimple_constant
>96 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/bounds-1.c
>main is_gimple_constant
>96 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/bounds-1.c
>main is_gimple_constant
>     74 64 cxg2021.adb cxg2021 TREE_CONSTANT
>     74 64 cxg2021.adb cxg2021 is_gimple_constant
>     74 64 cxg2020.adb cxg2020 TREE_CONSTANT
>     74 64 cxg2020.adb cxg2020 is_gimple_constant
>     74 64 cxg2019.adb cxg2019 TREE_CONSTANT
>     74 64 cxg2019.adb cxg2019 is_gimple_constant
>     74 64 cxg2018.adb cxg2018 TREE_CONSTANT
>     74 64 cxg2018.adb cxg2018 is_gimple_constant
>     60 64 a74106b.adb a74106b TREE_CONSTANT
>     60 64 a74106b.adb a74106b is_gimple_constant
>48 64
>/home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/20000923-1.c
>foo is_gimple_constant
>48 32
>/home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/20000923-1.c
>foo is_gimple_constant
>     46 64 cxg2008.adb cxg2008 TREE_CONSTANT
>     46 64 cxg2008.adb cxg2008 is_gimple_constant
>     46 64 cxg2002.adb cxg2002 TREE_CONSTANT
>     46 64 cxg2002.adb cxg2002 is_gimple_constant
>42 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/vla-2.c main
>is_gimple_constant
>     42 64 cxg2010.adb cxg2010 TREE_CONSTANT
>     42 64 cxg2010.adb cxg2010 is_gimple_constant
>     42 64 cxg2007.adb cxg2007 TREE_CONSTANT
>     42 64 cxg2007.adb cxg2007 is_gimple_constant
>     42 64 cxg2006.adb cxg2006 TREE_CONSTANT
>     42 64 cxg2006.adb cxg2006 is_gimple_constant
>     42 64 cxg2003.adb cxg2003 TREE_CONSTANT
>     42 64 cxg2003.adb cxg2003 is_gimple_constant
>42 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/vla-2.c main
>is_gimple_constant
>     38 64 cxg2017.adb cxg2017 TREE_CONSTANT
>     38 64 cxg2017.adb cxg2017 is_gimple_constant
>     38 64 cxg2016.adb cxg2016 TREE_CONSTANT
>     38 64 cxg2016.adb cxg2016 is_gimple_constant
>     38 64 cxg2015.adb cxg2015 TREE_CONSTANT
>     38 64 cxg2015.adb cxg2015 is_gimple_constant
>     38 64 cxg2014.adb cxg2014 TREE_CONSTANT
>     38 64 cxg2014.adb cxg2014 is_gimple_constant
>     38 64 cxg2013.adb cxg2013 TREE_CONSTANT
>     38 64 cxg2013.adb cxg2013 is_gimple_constant
>     38 64 cxg2012.adb cxg2012 TREE_CONSTANT
>     38 64 cxg2012.adb cxg2012 is_gimple_constant
>     38 64 cxg2011.adb cxg2011 TREE_CONSTANT
>     38 64 cxg2011.adb cxg2011 is_gimple_constant
>     38 64 cxg2004.adb cxg2004 TREE_CONSTANT
>     38 64 cxg2004.adb cxg2004 is_gimple_constant
>     38 64 cxg2001.adb cxg2001 TREE_CONSTANT
>     38 64 cxg2001.adb cxg2001 is_gimple_constant
>     38 64 cc1222a.adb cc1222a TREE_CONSTANT
>     38 64 cc1222a.adb cc1222a is_gimple_constant
>     36 64 cxg1005.adb cxg1005 TREE_CONSTANT
>     36 64 cxg1005.adb cxg1005 is_gimple_constant
>     36 64 cxg1004.adb cxg1004 TREE_CONSTANT
>     36 64 cxg1004.adb cxg1004 is_gimple_constant
>     36 64 c43004a.adb c43004a TREE_CONSTANT
>     36 64 c43004a.adb c43004a is_gimple_constant
>35 64
>/home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/vla-const-1.c f
>TREE_CONSTANT
>35 64
>/home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c
>dynreplace_add_trampoline TREE_CONSTANT
>35 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/pr71512-1.c
>DrawChunk is_gimple_constant
>35 64
>/home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c
>Run is_gimple_constant
>35 64
>/home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/clone-test-1.c main
>is_gimple_constant
>35 32
>/home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/vla-const-1.c f
>TREE_CONSTANT
>35 32
>/home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c
>dynreplace_add_trampoline TREE_CONSTANT
>35 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/pr71512-1.c
>DrawChunk is_gimple_constant
>35 32
>/home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c
>Run is_gimple_constant
>35 32
>/home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/clone-test-1.c main
>is_gimple_constant
>     34 64 cc3232a.adb cc3232a TREE_CONSTANT
>     34 64 cc3232a.adb cc3232a is_gimple_constant
>     30 64 cxaa009.adb cxaa009 TREE_CONSTANT
>     30 64 cxaa009.adb cxaa009 is_gimple_constant
>     28 64 cc3601a.adb cc3601a TREE_CONSTANT
>     28 64 cc3601a.adb cc3601a is_gimple_constant
>     28 64 c52005e.adb c52005e TREE_CONSTANT
>     28 64 c52005e.adb c52005e is_gimple_constant
>     28 64 c52005b.adb c52005b TREE_CONSTANT
>     28 64 c52005b.adb c52005b is_gimple_constant
>     24 64 cxg1003.adb cxg1003 TREE_CONSTANT
>     24 64 cxg1003.adb cxg1003 is_gimple_constant
>     24 64 c64103b.adb c64103b TREE_CONSTANT
>     24 64 c64103b.adb c64103b is_gimple_constant
>     24 64 c49025a.adb c49025a TREE_CONSTANT
>     24 64 c49025a.adb c49025a is_gimple_constant
>     24 64 c47005a.adb c47005a TREE_CONSTANT
>     24 64 c47005a.adb c47005a is_gimple_constant
>     24 64 c45242b.adb c45242b TREE_CONSTANT
>     24 64 c45242b.adb c45242b is_gimple_constant
>     24 64 c35801d.adb c35801d TREE_CONSTANT
>     24 64 c35801d.adb c35801d is_gimple_constant
>     24 64 c35704c.adb c35704c TREE_CONSTANT
>     24 64 c35704c.adb c35704c is_gimple_constant
>     24 64 c35704b.adb c35704b TREE_CONSTANT
>     24 64 c35704b.adb c35704b is_gimple_constant
>     24 64 a35801f.adb a35801f TREE_CONSTANT
>     24 64 a35801f.adb a35801f is_gimple_constant
>     22 64 cc3125c.adb cc3125c TREE_CONSTANT
>     22 64 cc3125c.adb cc3125c is_gimple_constant
>     22 64 cc1111a.adb cc1111a TREE_CONSTANT
>     22 64 cc1111a.adb cc1111a is_gimple_constant
>20 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c99-const-expr-12.c f
>is_gimple_constant
>     20 64 cxg1002.adb cxg1002 TREE_CONSTANT
>     20 64 cxg1002.adb cxg1002 is_gimple_constant
>     20 64 cxg1001.adb cxg1001 TREE_CONSTANT
>     20 64 cxg1001.adb cxg1001 is_gimple_constant
>     20 64 cxa5a10.adb cxa5a10 TREE_CONSTANT
>     20 64 cxa5a10.adb cxa5a10 is_gimple_constant
>     20 64 cxa5a09.adb cxa5a09 TREE_CONSTANT
>     20 64 cxa5a09.adb cxa5a09 is_gimple_constant
>     20 64 cxa5a08.adb cxa5a08 TREE_CONSTANT
>     20 64 cxa5a08.adb cxa5a08 is_gimple_constant
>     20 64 cxa5a07.adb cxa5a07 TREE_CONSTANT
>     20 64 cxa5a07.adb cxa5a07 is_gimple_constant
>     20 64 cxa5a06.adb cxa5a06 TREE_CONSTANT
>     20 64 cxa5a06.adb cxa5a06 is_gimple_constant
>     20 64 cxa5a05.adb cxa5a05 TREE_CONSTANT
>     20 64 cxa5a05.adb cxa5a05 is_gimple_constant
>     20 64 cxa5a04.adb cxa5a04 TREE_CONSTANT
>     20 64 cxa5a04.adb cxa5a04 is_gimple_constant
>     20 64 cxa5a03.adb cxa5a03 TREE_CONSTANT
>     20 64 cxa5a03.adb cxa5a03 is_gimple_constant
>     20 64 cxa5a02.adb cxa5a02 TREE_CONSTANT
>     20 64 cxa5a02.adb cxa5a02 is_gimple_constant
>     20 64 cxa5a01.adb cxa5a01 TREE_CONSTANT
>     20 64 cxa5a01.adb cxa5a01 is_gimple_constant
>     20 64 cc3222a.adb cc3222a TREE_CONSTANT
>     20 64 cc3222a.adb cc3222a is_gimple_constant
>     20 64 c34003c.adb c34003c TREE_CONSTANT
>     20 64 c34003c.adb c34003c is_gimple_constant
>20 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c99-const-expr-12.c f
>is_gimple_constant
>     18 64 cc3016b.adb cc3016b TREE_CONSTANT
>     18 64 cc3016b.adb cc3016b is_gimple_constant
>     18 64 c87b23a.adb c87b23a TREE_CONSTANT
>     18 64 c87b23a.adb c87b23a is_gimple_constant
>     18 64 c49026a.adb c49026a TREE_CONSTANT
>     18 64 c49026a.adb c49026a is_gimple_constant
>     18 64 c32001a.adb c32001a TREE_CONSTANT
>     18 64 c32001a.adb c32001a is_gimple_constant
>17 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/enum-incomplete-3.c foo
>is_gimple_constant
>17 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/enum-incomplete-3.c foo
>is_gimple_constant
>     16 64 s-rannum.adb system.random_numbers.random TREE_CONSTANT
>     16 64 s-rannum.adb system.random_numbers.random is_gimple_constant
>     16 64 s-rannum.adb system.random_numbers.random.f TREE_CONSTANT
>   16 64 s-rannum.adb system.random_numbers.random.f is_gimple_constant
>     16 64 g-forstr.adb gnat.formatted_string."&" TREE_CONSTANT
>     16 64 g-forstr.adb gnat.formatted_string."&" is_gimple_constant
>16 64 g-forstr.adb gnat.formatted_string."&".float_format TREE_CONSTANT
>16 64 g-forstr.adb gnat.formatted_string."&".float_format
>is_gimple_constant
>     16 64 cxa5015.adb cxa5015 TREE_CONSTANT
>     16 64 cxa5015.adb cxa5015 is_gimple_constant
>     16 64 c49023a.adb c49023a TREE_CONSTANT
>     16 64 c49023a.adb c49023a is_gimple_constant
>     16 64 c38102b.adb c38102b TREE_CONSTANT
>     16 64 c38102b.adb c38102b is_gimple_constant
>     16 64 c35704d.adb c35704d TREE_CONSTANT
>     16 64 c35704d.adb c35704d is_gimple_constant
>     16 32 s-rannum.adb system.random_numbers.random TREE_CONSTANT
>     16 32 s-rannum.adb system.random_numbers.random is_gimple_constant
>     16 32 s-rannum.adb system.random_numbers.random.f TREE_CONSTANT
>   16 32 s-rannum.adb system.random_numbers.random.f is_gimple_constant
>     16 32 g-forstr.adb gnat.formatted_string."&" TREE_CONSTANT
>     16 32 g-forstr.adb gnat.formatted_string."&" is_gimple_constant
>16 32 g-forstr.adb gnat.formatted_string."&".float_format TREE_CONSTANT
>16 32 g-forstr.adb gnat.formatted_string."&".float_format
>is_gimple_constant
>     14 64 la140052.adb la140052 TREE_CONSTANT
>     14 64 la140052.adb la140052 is_gimple_constant
>     14 64 cxg2005.adb cxg2005 TREE_CONSTANT
>     14 64 cxg2005.adb cxg2005 is_gimple_constant
>     14 64 ce3806c.adb ce3806c TREE_CONSTANT
>     14 64 ce3806c.adb ce3806c is_gimple_constant
>     14 64 ce3804f.adb ce3804f TREE_CONSTANT
>     14 64 ce3804f.adb ce3804f is_gimple_constant
>     14 64 cd2c11a.adb cd2c11a TREE_CONSTANT
>     14 64 cd2c11a.adb cd2c11a is_gimple_constant
>     14 64 cd10002.adb cd10002 TREE_CONSTANT
>     14 64 cd10002.adb cd10002 is_gimple_constant
>     14 64 c85018b.adb c85018b TREE_CONSTANT
>     14 64 c85018b.adb c85018b is_gimple_constant
>     14 64 c74302b.adb c74302b TREE_CONSTANT
>     14 64 c74302b.adb c74302b is_gimple_constant
>     14 64 c3a0010.adb c3a0010 TREE_CONSTANT
>     14 64 c3a0010.adb c3a0010 is_gimple_constant
>     14 64 c3a0003.adb c3a0003 TREE_CONSTANT
>     14 64 c3a0003.adb c3a0003 is_gimple_constant
>     14 64 c32111b.adb c32111b TREE_CONSTANT
>     14 64 c32111b.adb c32111b is_gimple_constant
>     14 64 c32111a.adb c32111a TREE_CONSTANT
>     14 64 c32111a.adb c32111a is_gimple_constant
>     12 64 cc51006.adb cc51006 TREE_CONSTANT
>     12 64 cc51006.adb cc51006 is_gimple_constant
>     12 64 c87b34b.adb c87b34b TREE_CONSTANT
>     12 64 c87b34b.adb c87b34b is_gimple_constant
>     12 64 c87b10a.adb c87b10a TREE_CONSTANT
>     12 64 c87b10a.adb c87b10a is_gimple_constant
>     12 64 c87b09c.adb c87b09c TREE_CONSTANT
>     12 64 c87b09c.adb c87b09c is_gimple_constant
>     12 64 c87b09a.adb c87b09a TREE_CONSTANT
>     12 64 c87b09a.adb c87b09a is_gimple_constant
>     12 64 c83051a.adb c83051a TREE_CONSTANT
>     12 64 c83051a.adb c83051a is_gimple_constant
>     12 64 c47002b.adb c47002b TREE_CONSTANT
>     12 64 c47002b.adb c47002b is_gimple_constant
>     12 64 c46021a.adb c46021a TREE_CONSTANT
>     12 64 c46021a.adb c46021a is_gimple_constant
>     12 64 c460008.adb c460008 TREE_CONSTANT
>     12 64 c460008.adb c460008 is_gimple_constant
>     12 64 c3a0015.adb c3a0015 TREE_CONSTANT
>     12 64 c3a0015.adb c3a0015 is_gimple_constant
>     12 64 c38102e.adb c38102e.proc TREE_CONSTANT
>     12 64 c38102e.adb c38102e.proc is_gimple_constant
>     12 64 c35703a.adb c35703a TREE_CONSTANT
>     12 64 c35703a.adb c35703a is_gimple_constant
>     12 64 c34003a.adb c34003a TREE_CONSTANT
>     12 64 c34003a.adb c34003a is_gimple_constant
>10 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/combined-directives-1.c
>main is_gimple_constant
>10 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr25682.c foo
>is_gimple_constant
>     10 64 ce3810a.adb ce3810a TREE_CONSTANT
>     10 64 ce3810a.adb ce3810a is_gimple_constant
>     10 64 ce3809a.adb ce3809a TREE_CONSTANT
>     10 64 ce3809a.adb ce3809a is_gimple_constant
>     10 64 ce3806e.adb ce3806e TREE_CONSTANT
>     10 64 ce3806e.adb ce3806e is_gimple_constant
>     10 64 ce3806d.adb ce3806d TREE_CONSTANT
>     10 64 ce3806d.adb ce3806d is_gimple_constant
>     10 64 ce3804i.adb ce3804i TREE_CONSTANT
>     10 64 ce3804i.adb ce3804i is_gimple_constant
>     10 64 ce3804g.adb ce3804g TREE_CONSTANT
>     10 64 ce3804g.adb ce3804g is_gimple_constant
>     10 64 ce3804d.adb ce3804d TREE_CONSTANT
>     10 64 ce3804d.adb ce3804d is_gimple_constant
>     10 64 ce3804a.adb ce3804a TREE_CONSTANT
>     10 64 ce3804a.adb ce3804a is_gimple_constant
>     10 64 ce3801a.adb ce3801a TREE_CONSTANT
>     10 64 ce3801a.adb ce3801a is_gimple_constant
>     10 64 c87b41a.adb c87b41a TREE_CONSTANT
>     10 64 c87b41a.adb c87b41a is_gimple_constant
>     10 64 c87b08a.adb c87b08a TREE_CONSTANT
>     10 64 c87b08a.adb c87b08a is_gimple_constant
>     10 64 c45252b.adb c45252b TREE_CONSTANT
>     10 64 c45252b.adb c45252b is_gimple_constant
>     10 64 c392002.adb c392002 TREE_CONSTANT
>     10 64 c392002.adb c392002 is_gimple_constant
>     10 64 c38102e.adb c38102e TREE_CONSTANT
>     10 64 c38102e.adb c38102e is_gimple_constant
>     10 64 c35003d.adb c35003d TREE_CONSTANT
>     10 64 c35003d.adb c35003d is_gimple_constant
>10 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/combined-directives-1.c
>main is_gimple_constant
>10 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr25682.c foo
>is_gimple_constant
>      9 64 c87b04b.adb c87b04b TREE_CONSTANT
>      9 64 c87b04b.adb c87b04b is_gimple_constant
>      9 64 c34011b.adb c34011b TREE_CONSTANT
>      9 64 c34011b.adb c34011b is_gimple_constant
> 8 64 s-fatsfl.ads system.fat_sflt.attr_short_float.valid TREE_CONSTANT
>8 64 s-fatsfl.ads system.fat_sflt.attr_short_float.valid
>is_gimple_constant
>8 64 s-fatllf.ads system.fat_llf.attr_long_long_float.valid
>TREE_CONSTANT
>8 64 s-fatllf.ads system.fat_llf.attr_long_long_float.valid
>is_gimple_constant
>  8 64 s-fatlfl.ads system.fat_lflt.attr_long_float.valid TREE_CONSTANT
>8 64 s-fatlfl.ads system.fat_lflt.attr_long_float.valid
>is_gimple_constant
>      8 64 s-fatflt.ads system.fat_flt.attr_float.valid TREE_CONSTANT
>   8 64 s-fatflt.ads system.fat_flt.attr_float.valid is_gimple_constant
>8 64
>/home/jakub/src/gcc/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-user-1.c
>main is_gimple_constant
>8 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/gomp/pr47963.c foo
>is_gimple_constant
>      8 64 cda201b.adb cda201b TREE_CONSTANT
>      8 64 cda201b.adb cda201b is_gimple_constant
>      8 64 cc3305c.adb cc3305c TREE_CONSTANT
>      8 64 cc3305c.adb cc3305c is_gimple_constant
>      8 64 cc1311b.adb cc1311b TREE_CONSTANT
>      8 64 cc1311b.adb cc1311b is_gimple_constant
>      8 64 c87b30a.adb c87b30a TREE_CONSTANT
>      8 64 c87b30a.adb c87b30a is_gimple_constant
>      8 64 c87b18b.adb c87b18b TREE_CONSTANT
>      8 64 c87b18b.adb c87b18b is_gimple_constant
>      8 64 c3a0015.adb c3a0015.std.check3 TREE_CONSTANT
>      8 64 c3a0015.adb c3a0015.std.check3 is_gimple_constant
>      8 64 c3a0015.adb c3a0015.std.check2 TREE_CONSTANT
>      8 64 c3a0015.adb c3a0015.std.check2 is_gimple_constant
>      8 64 c3a0015.adb c3a0015.std.check1 TREE_CONSTANT
>      8 64 c3a0015.adb c3a0015.std.check1 is_gimple_constant
> 8 32 s-fatsfl.ads system.fat_sflt.attr_short_float.valid TREE_CONSTANT
>8 32 s-fatsfl.ads system.fat_sflt.attr_short_float.valid
>is_gimple_constant
>8 32 s-fatllf.ads system.fat_llf.attr_long_long_float.valid
>TREE_CONSTANT
>8 32 s-fatllf.ads system.fat_llf.attr_long_long_float.valid
>is_gimple_constant
>  8 32 s-fatlfl.ads system.fat_lflt.attr_long_float.valid TREE_CONSTANT
>8 32 s-fatlfl.ads system.fat_lflt.attr_long_float.valid
>is_gimple_constant
>      8 32 s-fatflt.ads system.fat_flt.attr_float.valid TREE_CONSTANT
>   8 32 s-fatflt.ads system.fat_flt.attr_float.valid is_gimple_constant
>8 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/gomp/pr47963.c foo
>is_gimple_constant
>7 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/array-5.c func
>is_gimple_constant
>7 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/array-5.c func
>is_gimple_constant
>6 64 ../../../../libgomp/testsuite/libgomp.c/examples-4/target_data-3.c
>main is_gimple_constant
>6 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/ice_type.adb ice_type
>TREE_CONSTANT
>6 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/ice_type.adb ice_type
>is_gimple_constant
>      6 64 cxac004.adb cxac004 TREE_CONSTANT
>      6 64 cxac004.adb cxac004 is_gimple_constant
>      6 64 cd7305a.adb cd7305a TREE_CONSTANT
>      6 64 cd7305a.adb cd7305a is_gimple_constant
>      6 64 cd5014e.adb cd5014e TREE_CONSTANT
>      6 64 cd5014e.adb cd5014e is_gimple_constant
>      6 64 cd5013e.adb cd5013e TREE_CONSTANT
>      6 64 cd5013e.adb cd5013e is_gimple_constant
>      6 64 cd1c03f.adb cd1c03f TREE_CONSTANT
>      6 64 cd1c03f.adb cd1c03f is_gimple_constant
>      6 64 c974014.adb c974014 TREE_CONSTANT
>      6 64 c974014.adb c974014 is_gimple_constant
>      6 64 c95092a.adb c95092a TREE_CONSTANT
>      6 64 c95092a.adb c95092a is_gimple_constant
>      6 64 c87b54a.adb c87b54a TREE_CONSTANT
>      6 64 c87b54a.adb c87b54a is_gimple_constant
>      6 64 c87b06a.adb c87b06a TREE_CONSTANT
>      6 64 c87b06a.adb c87b06a is_gimple_constant
>      6 64 c74004a.adb c74004a TREE_CONSTANT
>      6 64 c74004a.adb c74004a is_gimple_constant
>      6 64 c72002a.adb c72002a TREE_CONSTANT
>      6 64 c72002a.adb c72002a is_gimple_constant
>      6 64 c4a013a.adb c4a013a TREE_CONSTANT
>      6 64 c4a013a.adb c4a013a is_gimple_constant
>      6 64 c4a011a.adb c4a011a TREE_CONSTANT
>      6 64 c4a011a.adb c4a011a is_gimple_constant
>      6 64 c49024a.adb c49024a TREE_CONSTANT
>      6 64 c49024a.adb c49024a is_gimple_constant
>      6 64 c47009b.adb c47009b TREE_CONSTANT
>      6 64 c47009b.adb c47009b is_gimple_constant
>      6 64 c46032a.adb c46032a TREE_CONSTANT
>      6 64 c46032a.adb c46032a is_gimple_constant
>      6 64 c46024a.adb c46024a TREE_CONSTANT
>      6 64 c46024a.adb c46024a is_gimple_constant
>      6 64 c45624b.adb c45624b TREE_CONSTANT
>      6 64 c45624b.adb c45624b is_gimple_constant
>      6 64 c45624a.adb c45624a TREE_CONSTANT
>      6 64 c45624a.adb c45624a is_gimple_constant
>      6 64 c45622a.adb c45622a TREE_CONSTANT
>      6 64 c45622a.adb c45622a is_gimple_constant
>      6 64 c456001.adb c456001 TREE_CONSTANT
>      6 64 c456001.adb c456001 is_gimple_constant
>      6 64 c45523a.adb c45523a TREE_CONSTANT
>      6 64 c45523a.adb c45523a is_gimple_constant
>      6 64 c45323a.adb c45323a TREE_CONSTANT
>      6 64 c45323a.adb c45323a is_gimple_constant
>      6 64 c45322a.adb c45322a TREE_CONSTANT
>      6 64 c45322a.adb c45322a is_gimple_constant
>      6 64 c44003d.adb c44003d TREE_CONSTANT
>      6 64 c44003d.adb c44003d is_gimple_constant
>      6 64 c41323a.adb c41323a TREE_CONSTANT
>      6 64 c41323a.adb c41323a is_gimple_constant
>      6 64 c392003.adb c392003 TREE_CONSTANT
>      6 64 c392003.adb c392003 is_gimple_constant
>      6 64 c37009a.adb c37009a TREE_CONSTANT
>      6 64 c37009a.adb c37009a is_gimple_constant
>      6 64 c2a008a.adb c2a008a TREE_CONSTANT
>      6 64 c2a008a.adb c2a008a is_gimple_constant
>      6 64 c24207a.adb c24207a TREE_CONSTANT
>      6 64 c24207a.adb c24207a is_gimple_constant
>      6 64 c24203b.adb c24203b TREE_CONSTANT
>      6 64 c24203b.adb c24203b is_gimple_constant
>6 32 ../../../../libgomp/testsuite/libgomp.c/examples-4/target_data-3.c
>main is_gimple_constant
>     5 64 /tmp/cgo-gcc-input-048096209.c testSendSIG is_gimple_constant
>5 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/zero_length_subarrays.c
>main is_gimple_constant
>5 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-4.c
>test_reductions is_gimple_constant
>5 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c
>test_reductions_minmax is_gimple_cotant
>5 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c
>test_reductions is_gimple_constant
>5 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c
>test_reductions_minmax is_gimple_constant
>5 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c
>test_reductions is_gimple_constant
>5 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c
>test_reductions_minmax is_gimple_constant
>5 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c
>test_reductions is_gimple_constant
>5 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c
>test_reductions_bool is_gimple_constant
>5 64
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/pr70688.c
>main is_gimple_constant
>      5 64 issue3250.cgo2.c testSendSIG is_gimple_constant
>5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/stack-check-18.c
>f2 is_gimple_constant
>5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr50527.c main
>is_gimple_constant
>5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr47086.c foo
>is_gimple_constant
>5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr44545.c DrawChunk
>is_gimple_constant
>5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr43513.c foo3
>is_gimple_constant
>5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/graphite/pr83277.c wv
>is_gimple_constant
>5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/graphite/pr83255.c main
>is_gimple_constant
>5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c99-const-expr-13.c f
>TREE_CONSTANT
>5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c90-const-expr-6.c f
>is_gimple_constant
>     5 32 /tmp/cgo-gcc-input-268957210.c testSendSIG is_gimple_constant
>5 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/zero_length_subarrays.c
>main is_gimple_constant
>5 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-4.c
>test_reductions is_gimple_constant
>5 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c
>test_reductions_minmax is_gimple_constant
>5 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c
>test_reductions is_gimple_constant
>5 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c
>test_reductions_minmax is_gimple_constant
>5 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c
>test_reductions is_gimple_constant
>5 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c
>test_reductions_minmax is_gimple_constant
>5 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c
>test_reductions is_gimple_constant
>5 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c
>test_reductions_bool is_gimple_constant
>5 32
>../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/pr70688.c
>main is_gimple_constant
>      5 32 issue3250.cgo2.c testSendSIG is_gimple_constant
>5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/stack-check-18.c
>f2 is_gimple_constant
>5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr50527.c main
>is_gimple_constant
>5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr47086.c foo
>is_gimple_constant
>5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr44545.c DrawChunk
>is_gimple_constant
>5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr43513.c foo3
>is_gimple_constant
>5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c99-const-expr-13.c f
>TREE_CONSTANT
>5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c90-const-expr-6.c f
>is_gimple_constant
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/unchecked_convert7.adb
>unchecked_convert7 TREE_CONSTANT
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/unchecked_convert7.adb
>unchecked_convert7 is_gimple_constant
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2_pkg.adb
>inline2_pkg.valid_real TREE_CONSTANT
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2_pkg.adb
>inline2_pkg.valid_real is_gimple_constant
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2_pkg.adb
>inline2_pkg.invalid_real TREE_CONSTANT
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2_pkg.adb
>inline2_pkg.invalid_real is_gimple_constant
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2.adb
>inline2_pkg.valid_real TREE_CONSTANT
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2.adb
>inline2_pkg.valid_real is_gimple_constant
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2.adb
>inline2_pkg.invalid_real TREE_CONSTANT
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline2.adb
>inline2_pkg.invalid_real is_gimple_constant
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline1.adb
>inline1_pkg.valid_real TREE_CONSTANT
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline1.adb
>inline1_pkg.valid_real is_gimple_constant
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline1.adb
>inline1_pkg.invalid_real TREE_CONSTANT
>4 64 /home/jakub/src/gcc/gcc/testsuite/gnat.dg/inline1.adb
>inline1_pkg.invalid_real is_gimple_constant
>      4 64 ce3815a.adb ce3815a TREE_CONSTANT
>      4 64 ce3815a.adb ce3815a is_gimple_constant
>      4 64 ce3806a.adb ce3806a TREE_CONSTANT
>      4 64 ce3806a.adb ce3806a is_gimple_constant
>      4 64 ce3805a.adb ce3805a TREE_CONSTANT
>      4 64 ce3805a.adb ce3805a is_gimple_constant
>      4 64 ce3804m.adb ce3804m TREE_CONSTANT
>      4 64 ce3804m.adb ce3804m is_gimple_constant
>      4 64 ce3804c.adb ce3804c TREE_CONSTANT
>      4 64 ce3804c.adb ce3804c is_gimple_constant
>      4 64 ce2401e.adb ce2401e TREE_CONSTANT
>      4 64 ce2401e.adb ce2401e is_gimple_constant
>      4 64 ce2201c.adb ce2201c TREE_CONSTANT
>      4 64 ce2201c.adb ce2201c is_gimple_constant
>      4 64 cc1222a.adb cc1222a.B_1.p2 TREE_CONSTANT
>      4 64 cc1222a.adb cc1222a.B_1.p2 is_gimple_constant
>      4 64 cc1222a.adb cc1222a.B_1.p1 TREE_CONSTANT
>      4 64 cc1222a.adb cc1222a.B_1.p1 is_gimple_constant
>      4 64 ca140232.adb ca140232.max_data_val TREE_CONSTANT
>      4 64 ca140232.adb ca140232.max_data_val is_gimple_constant
>      4 64 c87b47a.adb c87b47a TREE_CONSTANT
>      4 64 c87b47a.adb c87b47a is_gimple_constant
>      4 64 c87b42a.adb c87b42a TREE_CONSTANT
>      4 64 c87b42a.adb c87b42a is_gimple_constant
>      4 64 c87b34c.adb c87b34c TREE_CONSTANT
>      4 64 c87b34c.adb c87b34c is_gimple_constant
>      4 64 c87b07b.adb c87b07b TREE_CONSTANT
>      4 64 c87b07b.adb c87b07b is_gimple_constant
>      4 64 c83029a.adb c83029a TREE_CONSTANT
>      4 64 c83029a.adb c83029a is_gimple_constant
>      4 64 c83028a.adb c83028a TREE_CONSTANT
>      4 64 c83028a.adb c83028a is_gimple_constant
>      4 64 c83025a.adb c83025a TREE_CONSTANT
>      4 64 c83025a.adb c83025a is_gimple_constant
>      4 64 c83024a.adb c83024a TREE_CONSTANT
>      4 64 c83024a.adb c83024a is_gimple_constant
>      4 64 c83023a.adb c83023a TREE_CONSTANT
>      4 64 c83023a.adb c83023a is_gimple_constant
>      4 64 c83022g0m.adb c83022g0m TREE_CONSTANT
>      4 64 c83022g0m.adb c83022g0m is_gimple_constant
>      4 64 c83022a.adb c83022a TREE_CONSTANT
>      4 64 c83022a.adb c83022a is_gimple_constant
>      4 64 c35801d.adb c35801d.np3 TREE_CONSTANT
>      4 64 c35801d.adb c35801d.np3 is_gimple_constant
>      4 64 c35801d.adb c35801d.np2 TREE_CONSTANT
>      4 64 c35801d.adb c35801d.np2 is_gimple_constant
>      4 64 c35801d.adb c35801d.np1 TREE_CONSTANT
>      4 64 c35801d.adb c35801d.np1 is_gimple_constant
>      4 64 c35704a.adb c35704a TREE_CONSTANT
>      4 64 c35704a.adb c35704a is_gimple_constant
>      4 64 c34005c.adb c34005c TREE_CONSTANT
>      4 64 c34005c.adb c34005c is_gimple_constant
>      4 64 c34005a.adb c34005a TREE_CONSTANT
>      4 64 c34005a.adb c34005a is_gimple_constant
>      4 64 ada101a.adb ada101a TREE_CONSTANT
>      4 64 ada101a.adb ada101a is_gimple_constant
>
>2018-01-12  Jakub Jelinek  <jakub@redhat.com>
>	    Richard Biener  <rguenth@suse.de>
>
>	PR libgomp/83590
>	* gimplify.c (gimplify_one_sizepos): Make sure gimplify_one_sizepos
>	doesn't turn something previously non-INTEGER_CST into INTEGER_CST.
>
>--- gcc/gimplify.c.jj	2018-01-11 20:34:15.373975356 +0100
>+++ gcc/gimplify.c	2018-01-12 13:57:21.153274727 +0100
>@@ -12570,6 +12570,12 @@ gimplify_one_sizepos (tree *expr_p, gimp
>/* SSA names in decl/type fields are a bad idea - they'll get reclaimed
>      if the def vanishes.  */
> gimplify_expr (expr_p, stmt_p, NULL, is_gimple_val, fb_rvalue, false);
>+
>+  /* If expr wasn't already is_gimple_sizepos from the FE, ensure that
>it
>+     is a VAR_DECL, otherwise we might handle some decls as
>gimplify_vla_decl
>+     even when they would have all sizes INTEGER_CSTs.  */
>+  if (is_gimple_constant (*expr_p))
>+    *expr_p = get_initialized_tmp_var (*expr_p, stmt_p, NULL, false);
> }
> 
>/* Gimplify the body of statements of FNDECL and return a GIMPLE_BIND
>node
>
>
>	Jakub
Jakub Jelinek Jan. 12, 2018, 5:08 p.m. | #6
On Fri, Jan 12, 2018 at 05:45:15PM +0100, Richard Biener wrote:
> >In a few C testcases the cases with TREE_CONSTANT before gimplify_expr
> >are
> >stuff like:
> >extern void dynreplace_trampoline(void);
> >extern void dynreplace_trampoline_endlabel(void);
> >int dynreplace_add_trampoline(void)
> >{
> >unsigned long trampoline_code[(((unsigned long)
> >(&(dynreplace_trampoline_endlabel))-(unsigned long)
> >(&dynreplace_trampoline)))];
> >}
> >and similar, for C is_gimple_constant after, i.e. what the patch
> >changes, is
> >those VLAs that use const vars in the expressions.  Changing that is
> >perhaps
> >acceptable.  On the other side, the amount of Ada changes is
> >significantly
> >higher.  Perhaps do
> >  if (is_gimple_constant (*expr_p)
> >      && (flag_openmp || flag_openacc || flag_openmp_simd))
> >, that way it will never affect Ada.
> 
> So what about not doing the temp var if the expr was TREE_CONSTANT? 

It is true that in my log file I don't have any cases where in C
it was first TREE_CONSTANT and turned into is_gimple_constant, but that
doesn't mean it isn't possible.

Looking at a random testcase, it is
#0  gimplify_one_sizepos(tree_node**, gimple**) () at ../../gcc/gimplify.c:12572
#1  0x000000000097f78d in gnat_gimplify_expr(tree_node**, gimple**, gimple**) () at ../../gcc/ada/gcc-interface/trans.c:8465
#2  0x0000000000ecf638 in gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) () at ../../gcc/gimplify.c:11343
#3  0x0000000000ed4087 in gimplify_stmt (stmt_p=<optimized out>, seq_p=seq_p@entry=0x7fffffffd880) at ../../gcc/gimplify.c:6658
#4  0x0000000000ed0f9c in gimplify_statement_list (pre_p=0x7fffffffd880, expr_p=0x7fffef8fd380) at ../../gcc/tree-iterator.h:86
which is:
      /* The expressions for the RM bounds must be gimplified to ensure that
         they are properly elaborated.  See gimplify_decl_expr.  */
      if ((TREE_CODE (op) == TYPE_DECL || TREE_CODE (op) == VAR_DECL)
          && !TYPE_SIZES_GIMPLIFIED (TREE_TYPE (op)))
        switch (TREE_CODE (TREE_TYPE (op)))
          {
          case INTEGER_TYPE:
          case ENUMERAL_TYPE:
          case BOOLEAN_TYPE:
          case REAL_TYPE:
            {
              tree type = TYPE_MAIN_VARIANT (TREE_TYPE (op)), t, val;

              val = TYPE_RM_MIN_VALUE (type);
              if (val)
                {
                  gimplify_one_sizepos (&val, pre_p);
                  for (t = type; t; t = TYPE_NEXT_VARIANT (t))
                    SET_TYPE_RM_MIN_VALUE (t, val);
                }

              val = TYPE_RM_MAX_VALUE (type);
              if (val)
                {
                  gimplify_one_sizepos (&val, pre_p);
                  for (t = type; t; t = TYPE_NEXT_VARIANT (t))
                    SET_TYPE_RM_MAX_VALUE (t, val);
                }

            }
            break;

          default:
            break;
          }
Those are the only 2 calls of gimplify_one_sizepos in the Ada FE,
so perhaps we could just use a different function for this purpose instead?

	Jakub
Jakub Jelinek Jan. 12, 2018, 11:33 p.m. | #7
On Fri, Jan 12, 2018 at 06:08:55PM +0100, Jakub Jelinek wrote:
> It is true that in my log file I don't have any cases where in C
> it was first TREE_CONSTANT and turned into is_gimple_constant, but that
> doesn't mean it isn't possible.
> 
> Looking at a random testcase, it is
> #0  gimplify_one_sizepos(tree_node**, gimple**) () at ../../gcc/gimplify.c:12572
> #1  0x000000000097f78d in gnat_gimplify_expr(tree_node**, gimple**, gimple**) () at ../../gcc/ada/gcc-interface/trans.c:8465
> #2  0x0000000000ecf638 in gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) () at ../../gcc/gimplify.c:11343
> #3  0x0000000000ed4087 in gimplify_stmt (stmt_p=<optimized out>, seq_p=seq_p@entry=0x7fffffffd880) at ../../gcc/gimplify.c:6658
> #4  0x0000000000ed0f9c in gimplify_statement_list (pre_p=0x7fffffffd880, expr_p=0x7fffef8fd380) at ../../gcc/tree-iterator.h:86

Apparently it isn't the only one where we can have a REAL_CST, another one
is gimplify_type_sizes:
  switch (TREE_CODE (type))
    {
    case INTEGER_TYPE:
    case ENUMERAL_TYPE:
    case BOOLEAN_TYPE:
    case REAL_TYPE:
    case FIXED_POINT_TYPE:
      gimplify_one_sizepos (&TYPE_MIN_VALUE (type), list_p);
      gimplify_one_sizepos (&TYPE_MAX_VALUE (type), list_p);

So, what about this patch instead?  No effect at all for any language
during bootstrap/regtest other than C, where it does something for:
     96 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/bounds-1.c main get_initialized_tmp_var
     96 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/bounds-1.c main get_initialized_tmp_var
     48 64 /home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/20000923-1.c foo get_initialized_tmp_var
     48 32 /home/jakub/src/gcc/gcc/testsuite/gcc.c-torture/compile/20000923-1.c foo get_initialized_tmp_var
     42 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/vla-2.c main get_initialized_tmp_var
     42 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/vla-2.c main get_initialized_tmp_var
     35 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/pr71512-1.c DrawChunk get_initialized_tmp_var
     35 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c Run get_initialized_tmp_var
     35 64 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/clone-test-1.c main get_initialized_tmp_var
     35 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/ubsan/pr71512-1.c DrawChunk get_initialized_tmp_var
     35 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c Run get_initialized_tmp_var
     35 32 /home/jakub/src/gcc/gcc/testsuite/c-c++-common/asan/clone-test-1.c main get_initialized_tmp_var
     20 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c99-const-expr-12.c f get_initialized_tmp_var
     20 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c99-const-expr-12.c f get_initialized_tmp_var
     17 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/enum-incomplete-3.c foo get_initialized_tmp_var
     17 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/enum-incomplete-3.c foo get_initialized_tmp_var
     10 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/combined-directives-1.c main get_initialized_tmp_var
     10 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr25682.c foo get_initialized_tmp_var
     10 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/combined-directives-1.c main get_initialized_tmp_var
     10 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr25682.c foo get_initialized_tmp_var
      8 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/graphite/isl-ast-gen-user-1.c main get_initialized_tmp_var
      8 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/gomp/pr47963.c foo get_initialized_tmp_var
      8 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/gomp/pr47963.c foo get_initialized_tmp_var
      7 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/array-5.c func get_initialized_tmp_var
      7 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/array-5.c func get_initialized_tmp_var
      6 64 ../../../../libgomp/testsuite/libgomp.c/examples-4/target_data-3.c main get_initialized_tmp_var
      6 32 ../../../../libgomp/testsuite/libgomp.c/examples-4/target_data-3.c main get_initialized_tmp_var
      5 64 /tmp/cgo-gcc-input-804501794.c testSendSIG get_initialized_tmp_var
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/zero_length_subarrays.c main get_initialized_tmp_var
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-4.c test_reductions get_initialized_tmp_var
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c test_reductions_minmax get_initialized_tmp_var
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c test_reductions get_initialized_tmp_var
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c test_reductions_minmax get_initialized_tmp_var
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c test_reductions get_initialized_tmp_var
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions_minmax get_initialized_tmp_var
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions get_initialized_tmp_var
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions_bool get_initialized_tmp_var
      5 64 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/pr70688.c main get_initialized_tmp_var
      5 64 issue3250.cgo2.c testSendSIG get_initialized_tmp_var
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/stack-check-18.c f2 get_initialized_tmp_var
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr50527.c main get_initialized_tmp_var
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr47086.c foo get_initialized_tmp_var
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr44545.c DrawChunk get_initialized_tmp_var
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr43513.c foo3 get_initialized_tmp_var
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/graphite/pr83277.c wv get_initialized_tmp_var
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/graphite/pr83255.c main get_initialized_tmp_var
      5 64 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c90-const-expr-6.c f get_initialized_tmp_var
      5 32 /tmp/cgo-gcc-input-988339533.c testSendSIG get_initialized_tmp_var
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/zero_length_subarrays.c main get_initialized_tmp_var
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-4.c test_reductions get_initialized_tmp_var
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c test_reductions_minmax get_initialized_tmp_var
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c test_reductions get_initialized_tmp_var
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c test_reductions_minmax get_initialized_tmp_var
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c test_reductions get_initialized_tmp_var
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions_minmax get_initialized_tmp_var
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions get_initialized_tmp_var
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c test_reductions_bool get_initialized_tmp_var
      5 32 ../../../../libgomp/testsuite/libgomp.oacc-c/../libgomp.oacc-c-c++-common/pr70688.c main get_initialized_tmp_var
      5 32 issue3250.cgo2.c testSendSIG get_initialized_tmp_var
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.target/i386/stack-check-18.c f2 get_initialized_tmp_var
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr50527.c main get_initialized_tmp_var
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr47086.c foo get_initialized_tmp_var
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr44545.c DrawChunk get_initialized_tmp_var
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/pr43513.c foo3 get_initialized_tmp_var
      5 32 /home/jakub/src/gcc/gcc/testsuite/gcc.dg/c90-const-expr-6.c f get_initialized_tmp_var
i.e. all cases where we have a const int/size_t etc. bound for a VLA.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2018-01-13  Jakub Jelinek  <jakub@redhat.com>
	    Richard Biener  <rguenth@suse.de>

	PR libgomp/83590
	* gimplify.c (gimplify_one_sizepos): Make sure gimplify_one_sizepos
	doesn't turn something previously non-INTEGER_CST into INTEGER_CST.

--- gcc/gimplify.c.jj	2018-01-11 20:34:15.373975356 +0100
+++ gcc/gimplify.c	2018-01-12 13:57:21.153274727 +0100
@@ -12570,6 +12570,15 @@ gimplify_one_sizepos (tree *expr_p, gimp
   /* SSA names in decl/type fields are a bad idea - they'll get reclaimed
      if the def vanishes.  */
   gimplify_expr (expr_p, stmt_p, NULL, is_gimple_val, fb_rvalue, false);
+
+  /* If expr wasn't already is_gimple_sizepos from the FE, ensure that it
+     is a VAR_DECL, otherwise we might handle some decls as gimplify_vla_decl
+     even when they would have all sizes INTEGER_CSTs.  Don't do this if
+     expr is a gimple constant and remains the same kind of constant after
+     gimplification, perhaps with overflows removed, as gimplify_one_sizepos
+     is also used for floating point minimum/maximum.  */
+  if (is_gimple_constant (*expr_p) && TREE_CODE (*expr_p) != TREE_CODE (expr))
+    *expr_p = get_initialized_tmp_var (*expr_p, stmt_p, NULL, false);
 }
 
 /* Gimplify the body of statements of FNDECL and return a GIMPLE_BIND node


	Jakub

Patch

--- gcc/gimplify.c.jj	2018-01-03 10:19:55.887534074 +0100
+++ gcc/gimplify.c	2018-01-11 10:10:37.733519519 +0100
@@ -1587,9 +1587,6 @@  gimplify_vla_decl (tree decl, gimple_seq
      for deferred expansion.  */
   tree t, addr, ptr_type;
 
-  gimplify_one_sizepos (&DECL_SIZE (decl), seq_p);
-  gimplify_one_sizepos (&DECL_SIZE_UNIT (decl), seq_p);
-
   /* Don't mess with a DECL_VALUE_EXPR set by the front-end.  */
   if (DECL_HAS_VALUE_EXPR_P (decl))
     return;
@@ -1673,6 +1670,9 @@  gimplify_decl_expr (tree *stmt_p, gimple
       tree init = DECL_INITIAL (decl);
       bool is_vla = false;
 
+      gimplify_one_sizepos (&DECL_SIZE (decl), seq_p);
+      gimplify_one_sizepos (&DECL_SIZE_UNIT (decl), seq_p);
+
       if (TREE_CODE (DECL_SIZE_UNIT (decl)) != INTEGER_CST
 	  || (!TREE_STATIC (decl)
 	      && flag_stack_check == GENERIC_STACK_CHECK
@@ -6548,14 +6548,15 @@  gimplify_target_expr (tree *expr_p, gimp
     {
       tree cleanup = NULL_TREE;
 
+      if (!TYPE_SIZES_GIMPLIFIED (TREE_TYPE (temp)))
+	gimplify_type_sizes (TREE_TYPE (temp), pre_p);
+      gimplify_one_sizepos (&DECL_SIZE (temp), pre_p);
+      gimplify_one_sizepos (&DECL_SIZE_UNIT (temp), pre_p);
+
       /* TARGET_EXPR temps aren't part of the enclosing block, so add it
 	 to the temps list.  Handle also variable length TARGET_EXPRs.  */
-      if (TREE_CODE (DECL_SIZE (temp)) != INTEGER_CST)
-	{
-	  if (!TYPE_SIZES_GIMPLIFIED (TREE_TYPE (temp)))
-	    gimplify_type_sizes (TREE_TYPE (temp), pre_p);
-	  gimplify_vla_decl (temp, pre_p);
-	}
+      if (TREE_CODE (DECL_SIZE_UNIT (temp)) != INTEGER_CST)
+	gimplify_vla_decl (temp, pre_p);
       else
 	{
 	  /* Save location where we need to place unpoisoning.  It's possible
--- gcc/testsuite/gcc.target/i386/stack-check-18.c.jj	2018-01-03 21:21:38.707907706 +0100
+++ gcc/testsuite/gcc.target/i386/stack-check-18.c	2018-01-11 19:10:11.933703006 +0100
@@ -7,7 +7,7 @@  int f1 (char *);
 int
 f2 (void)
 {
-  const int size = 4096;
+  int size = 4096;
   char buffer[size];
   return f1 (buffer);
 }