OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [utf-cvt.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* Contributed by Kris Van Hees  */
2
/* Test the char16_t and char32_t promotion rules. */
3
/* { dg-do compile } */
4
/* { dg-options "-std=c++0x -Wall -Wconversion -Wsign-conversion -Wsign-promo" } */
5
 
6
extern void f_c (char);
7
extern void fsc (signed char);
8
extern void fuc (unsigned char);
9
extern void f_s (short);
10
extern void fss (signed short);
11
extern void fus (unsigned short);
12
extern void f_i (int);
13
extern void fsi (signed int);
14
extern void fui (unsigned int);
15
extern void f_l (long);
16
extern void fsl (signed long);
17
extern void ful (unsigned long);
18
extern void f_ll (long long);
19
extern void fsll (signed long long);
20
extern void full (unsigned long long);
21
 
22
void m(char16_t c0, char32_t c1)
23
{
24
    f_c (c0);   /* { dg-warning "alter its value" } */
25
    fsc (c0);   /* { dg-warning "alter its value" } */
26
    fuc (c0);   /* { dg-warning "alter its value" } */
27
    f_s (c0);   /* { dg-warning "change the sign" } */
28
    fss (c0);   /* { dg-warning "change the sign" } */
29
    fus (c0);
30
    f_i (c0);
31
    fsi (c0);
32
    fui (c0);
33
    f_l (c0);
34
    fsl (c0);
35
    ful (c0);
36
    f_ll (c0);
37
    fsll (c0);
38
    full (c0);
39
 
40
    f_c (c1);   /* { dg-warning "alter its value" } */
41
    fsc (c1);   /* { dg-warning "alter its value" } */
42
    fuc (c1);   /* { dg-warning "alter its value" } */
43
    f_s (c1);   /* { dg-warning "alter its value" } */
44
    fss (c1);   /* { dg-warning "alter its value" } */
45
    fus (c1);   /* { dg-warning "alter its value" } */
46
    f_i (c1);   /* { dg-warning "change the sign" } */
47
    fsi (c1);   /* { dg-warning "change the sign" } */
48
    fui (c1);
49
    f_l (c1);   /* { dg-warning "change the sign" "" { target { llp64 || ilp32 } } } */
50
    fsl (c1);   /* { dg-warning "change the sign" "" { target { llp64 || ilp32 } } } */
51
    ful (c1);
52
    f_ll (c1);
53
    fsll (c1);
54
    full (c1);
55
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.