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/init/   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:     array56.C (1.73 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* PR c++/90938 - Initializing array with {1} works, but not {0}
   { dg-do compile { target c++11 } }
   { dg-options "-O -Wall -fdump-tree-optimized" } */

#define assert(e)                        \
  ((e) ? (void)0                        \
   : (__builtin_printf ("assertion failed on line %i: %s\n",    \
            __LINE__, #e),                \
      __builtin_abort ()))

namespace A {

struct X
{
  X () = default;
  X (int n) : n (n + 1) { }
  int n;
};

static_assert (__is_trivial (X), "X is trivial");

static void test ()
{
  {
    X x[] { 0 };
    assert (1 == x->n);
  }

  {
    X x[1] { 0 };
    assert (1 == x->n);                     // fails
  }

  {
    X x[2] { 0 };
    assert (1 == x[0].n && 0 == x[1].n);    // fails
  }

  {
    X x[] { 1, 0 };
    assert (2 == x[0].n && 1 == x[1].n);    // passes
  }

  {
    X x[2] { 1, 0 };
    assert (2 == x[0].n && 1 == x[1].n);    // fails
  }
}

}

namespace B {

struct X
{
  X () = default;
  X (int *p) : p (p ? p : new int (1)) { }
  int *p;
};

static_assert (__is_trivial (X), "X is trivial");

static void test ()
{
  X x[1] { nullptr };
  assert (*x->p == 1);   // fails

  X y[1] { 0 };
  assert (*y->p == 1);   // fails
}

}

namespace C {

static const char *vector_swizzle (int vecsize, int index)
{
  static const char *swizzle[4][4] =
    {
     { ".x", ".y", ".z", ".w" },
     { ".xy", ".yz", ".zw", nullptr },
     { ".xyz", ".yzw", nullptr, nullptr },
     { "", nullptr, nullptr, nullptr },
    };

  assert (vecsize >= 1 && vecsize <= 4);
  assert (index >= 0 && index < 4);
  assert (swizzle[vecsize - 1][index]);

  return swizzle[vecsize - 1][index];
}

static void test ()
{
  assert (!*vector_swizzle(4, 0));
}

}

int main ()
{
  A::test ();
  B::test ();
  C::test ();
}

// { dg-final { scan-tree-dump-not "abort" "optimized" } }

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