View | Details | Return to bug 84739
Collapse All | Expand All

(-)gcc/tree-tailcall.c.jj (-1 / +1 lines)
Lines 481-487 find_tail_calls (basic_block bb, struct Link Here
481
    {
481
    {
482
      tree arg;
482
      tree arg;
483
483
484
      for (param = DECL_ARGUMENTS (func), idx = 0;
484
      for (param = DECL_ARGUMENTS (current_function_decl), idx = 0;
485
	   param && idx < gimple_call_num_args (call);
485
	   param && idx < gimple_call_num_args (call);
486
	   param = DECL_CHAIN (param), idx ++)
486
	   param = DECL_CHAIN (param), idx ++)
487
	{
487
	{
(-)gcc/testsuite/gcc.dg/pr84739.c.jj (+26 lines)
Line 0 Link Here
1
/* PR tree-optimization/84739 */
2
/* { dg-do compile } */
3
/* { dg-require-weak "" } */
4
/* { dg-options "-O2" } */
5
6
static void baz (void) __attribute__((weakref("bar")));	/* { dg-warning "alias between functions of incompatible types" } */
7
8
int
9
foo (int x, int y)
10
{
11
  if (x)
12
    y = 0;
13
  if (y)
14
    goto lab;
15
  y = 0;
16
lab:
17
  return y;
18
}
19
20
void
21
bar (int x, int y)	/* { dg-message "aliased declaration here" } */
22
{
23
  y = foo (x, y);
24
  if (y != 0)
25
    baz ();
26
}

Return to bug 84739