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/g++.dg/   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:     Wclass-memaccess-3.C (6.31 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* PR c++/84850 - -Wclass-memaccess on a memcpy in a copy assignment
   operator with no nontrivial bases or members
   { dg-do compile }
   { dg-options "-Wclass-memaccess -ftrack-macro-expansion=0" } */

typedef __SIZE_TYPE__ size_t;

extern "C" void* memcpy (void*, const void*, size_t);
extern "C" void* memset (void*, int, size_t);

template <int>
struct EmptyClass { };

template <int>
struct TrivialClass
{
  bool a;
  int b;
  void *c;
  double d[2];
  void (*e)();
};

template <int>
struct HasDefault
{
  HasDefault ();
};

/* Verify that raw memory accesses from non-static members of a class with
   an empty base is not diagnosed.  */

struct EmptyWithBase: EmptyClass<0>, EmptyClass<1>, EmptyClass<2>
{
  EmptyWithBase ()
  {
    memset (this, 0, sizeof *this);
  }

  EmptyWithBase (const EmptyWithBase &x)
  {
    memcpy (this, &x, sizeof *this);
  }

  ~EmptyWithBase ()
  {
    memset (this, 0, sizeof *this);
  }

  void operator= (const EmptyWithBase &x)
  {
    memcpy (this, &x, sizeof *this);
  }

  void clear ()
  {
    memset (this, 0, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  void copy (const void *p)
  {
    memcpy (this, p, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  static void bad_clear (EmptyWithBase &x)
  {
    memset (&x, 0, sizeof x);         // { dg-warning "\\\[-Wclass-memaccess" }
  }

  static void bad_copy (EmptyWithBase &x, const void *p)
  {
    memcpy (&x, p, sizeof x);         // { dg-warning "\\\[-Wclass-memaccess" }
  }
};

/* Verify that raw memory accesses from non-static members of a class with
   all trivial members is not diagnosed.  */

struct HasTrivialMembers
{
  bool a;
  int b;
  void *c;
  double d[2];
  void (*e)();

  TrivialClass<1> trivial;

  HasTrivialMembers ()
  {
    memset (this, 0, sizeof *this);
  }

  HasTrivialMembers (const HasTrivialMembers &x)
  {
    memcpy (this, &x, sizeof *this);
  }

  ~HasTrivialMembers ()
  {
    memset (this, 0, sizeof *this);
  }

  void operator= (const HasTrivialMembers &x)
  {
    memcpy (this, &x, sizeof *this);
  }

  void clear ()
  {
    memset (this, 0, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  void copy (const void *p)
  {
    memcpy (this, p, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  static void bad_clear (HasTrivialMembers &x)
  {
    memset (&x, 0, sizeof x);         // { dg-warning "\\\[-Wclass-memaccess" }
  }

  static void bad_copy (HasTrivialMembers &x, const void *p)
  {
    memcpy (&x, p, sizeof x);         // { dg-warning "\\\[-Wclass-memaccess" }
  }
};

/* Verify that raw memory accesses from non-static members of a class with
   a trivial base class and no non-trivial members is not diagnosed.  */

struct HasTrivialBase: TrivialClass<1>
{
  TrivialClass<2> a[2];

  HasTrivialBase ()
  {
    memset (this, 0, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  HasTrivialBase (const HasTrivialBase &x)
  {
    memcpy (this, &x, sizeof *this);  // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  ~HasTrivialBase ()
  {
    memset (this, 0, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  void operator= (const HasTrivialBase &x)
  {
    memcpy (this, &x, sizeof *this);
  }

  void clear ()
  {
    memset (this, 0, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  void copy (void *p)
  {
    memcpy (this, p, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }
};


struct HasTrivialBases: TrivialClass<1>, TrivialClass<2>
{
  TrivialClass<3> a[2];

  HasTrivialBases ()
  {
    memset (this, 0, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  HasTrivialBases (const HasTrivialBases &x)
  {
    memcpy (this, &x, sizeof *this);  // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  ~HasTrivialBases ()
  {
    memset (this, 0, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  void operator= (const HasTrivialBases &x)
  {
    memcpy (this, &x, sizeof *this);
  }

  void clear ()
  {
    memset (this, 0, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }

  void copy (void *p)
  {
    memcpy (this, p, sizeof *this);   // { dg-bogus "\\\[-Wclass-memaccess" }
  }
};

struct DerivesFromNontrivialClass: HasDefault<1> { };

/* Verify that raw memory accesses from members of a class with a non-trivial
   base class is diagnosed.  */

struct HasNonTrivialBase: TrivialClass<1>, TrivialClass<2>,
              DerivesFromNontrivialClass,
              TrivialClass<3>, TrivialClass<4>
{
  HasNonTrivialBase ()
  {
    memset (this, 0, sizeof *this);   // { dg-warning "\\\[-Wclass-memaccess" }
  }

  HasNonTrivialBase (const HasNonTrivialBase &x)
  {
    memcpy (this, &x, sizeof *this);  // { dg-warning "\\\[-Wclass-memaccess" }
  }

  ~HasNonTrivialBase ()
  {
    memset (this, 0, sizeof *this);   // { dg-warning "\\\[-Wclass-memaccess" }
  }

  HasNonTrivialBase& operator= (const HasNonTrivialBase &x)
  {
    memcpy (this, &x, sizeof *this);  // { dg-warning "\\\[-Wclass-memaccess" }
    return *this;
  }

  void clear ()
  {
    memset (this, 0, sizeof *this);   // { dg-warning "\\\[-Wclass-memaccess" }
  }

  void copy (void *p)
  {
    memcpy (this, p, sizeof *this);   // { dg-warning "\\\[-Wclass-memaccess" }
  }
};

struct DerivesIndidirectlyFromNontrivialClass:
  TrivialClass<1>, TrivialClass<2>,
  DerivesFromNontrivialClass,
  TrivialClass<3>, TrivialClass<4> { };

/* Verify that raw memory accesses from members of a class with a non-trivial
   indirect base class is diagnosed.  */

struct HasIndirectNonTrivialBase: TrivialClass<5>, TrivialClass<6>,
                  TrivialClass<7>, TrivialClass<8>,
                  DerivesIndidirectlyFromNontrivialClass
{
  HasIndirectNonTrivialBase ()
  {
    memset (this, 0, sizeof *this);   // { dg-warning "\\\[-Wclass-memaccess" }
  }

  HasIndirectNonTrivialBase (const HasIndirectNonTrivialBase &x)
  {
    memcpy (this, &x, sizeof *this);  // { dg-warning "\\\[-Wclass-memaccess" }
  }

  ~HasIndirectNonTrivialBase ()
  {
    memset (this, 0, sizeof *this);   // { dg-warning "\\\[-Wclass-memaccess" }
  }

  HasIndirectNonTrivialBase& operator= (const HasIndirectNonTrivialBase &x)
  {
    memcpy (this, &x, sizeof *this);  // { dg-warning "\\\[-Wclass-memaccess" }
    return *this;
  }

  void clear ()
  {
    memset (this, 0, sizeof *this);   // { dg-warning "\\\[-Wclass-memaccess" }
  }

  void copy (void *p)
  {
    memcpy (this, p, sizeof *this);   // { dg-warning "\\\[-Wclass-memaccess" }
  }
};

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.0055 ]--