Commit 41f3efb5 by Uros Bizjak Committed by Uros Bizjak

cast.C: Change fields of structures to "long" to pass the test on targets with...

	* g++.dg/cast.C: Change fields of structures to "long" to pass
	the test on targets with STRUCTURE_SIZE_BOUNDARY != BITS_PER_UNIT.
	* g++.dg/cpp0x/iop.C: Ditto.
	* g++.dg/cpp0x/named_refs.C: Ditto.
	* g++.dg/cpp0x/rv1p.C: Ditto.
	* g++.dg/cpp0x/rv2p.C: Ditto.
	* g++.dg/cpp0x/rv3p.C: Ditto.
	* g++.dg/cpp0x/rv4p.C: Ditto.
	* g++.dg/cpp0x/rv5p.C: Ditto.
	* g++.dg/cpp0x/rv6p.C: Ditto.
	* g++.dg/cpp0x/rv7p.C: Ditto.
	* g++.dg/cpp0x/rv8p.C: Ditto.
	* g++.dg/cpp0x/unnamed_refs.C: Ditto.

From-SVN: r163240
parent 417e896e
2010-08-14 Uros Bizjak <ubizjak@gmail.com>
* g++.dg/cast.C: Change fields of structures to "long" to pass
the test on targets with STRUCTURE_SIZE_BOUNDARY != BITS_PER_UNIT.
* g++.dg/cpp0x/iop.C: Ditto.
* g++.dg/cpp0x/named_refs.C: Ditto.
* g++.dg/cpp0x/rv1p.C: Ditto.
* g++.dg/cpp0x/rv2p.C: Ditto.
* g++.dg/cpp0x/rv3p.C: Ditto.
* g++.dg/cpp0x/rv4p.C: Ditto.
* g++.dg/cpp0x/rv5p.C: Ditto.
* g++.dg/cpp0x/rv6p.C: Ditto.
* g++.dg/cpp0x/rv7p.C: Ditto.
* g++.dg/cpp0x/rv8p.C: Ditto.
* g++.dg/cpp0x/unnamed_refs.C: Ditto.
2010-08-13 Daniel Kraft <d@domob.eu>
* gfortran.dg/implied_shape_1.f08: New test.
......
......@@ -8,8 +8,8 @@
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct one {long x[1];};
struct two {long x[2];};
struct A {};
......@@ -19,8 +19,8 @@ two foo(A&&) {return two();}
int test1()
{
A a;
sa<sizeof(foo(a)) == 1> t1;
sa<sizeof(foo(static_cast<A&&>(a))) == 2> t2;
sa<sizeof(foo(a)) == 1 * sizeof(long)> t1;
sa<sizeof(foo(static_cast<A&&>(a))) == 2 * sizeof(long)> t2;
return 0;
}
......
......@@ -12,8 +12,8 @@
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct one {long x[1];};
struct two {long x[2];};
struct os
{
......@@ -30,7 +30,7 @@ two operator<<(os&, const A&);
void test()
{
os o;
sa<sizeof(o << 1) == 1> t1; // Calls os::operator<<(int)
sa<sizeof(o << 1) == 1 * sizeof(long)> t1; // Calls os::operator<<(int)
// Would be ambiguous if the implicit object parameter
// was an rvalue reference.
}
......
......@@ -8,8 +8,8 @@
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct one {long x[1];};
struct two {long x[2];};
struct A {};
......@@ -18,7 +18,7 @@ two foo(A&&) {return two();}
int test1(A&& a)
{
sa<sizeof(foo(a)) == 1> t1;
sa<sizeof(foo(a)) == 1 * sizeof(long)> t1;
return 0;
}
......
......@@ -8,14 +8,14 @@
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
struct four {char x[4];};
struct five {char x[5];};
struct six {char x[6];};
struct seven {char x[7];};
struct eight {char x[8];};
struct one {long x[1];};
struct two {long x[2];};
struct three {long x[3];};
struct four {long x[4];};
struct five {long x[5];};
struct six {long x[6];};
struct seven {long x[7];};
struct eight {long x[8];};
struct A
{
......@@ -38,7 +38,7 @@ int test1_1()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_1_1(a)) == 1> t1;
sa<sizeof(sink_1_1(a)) == 1 * sizeof(long)> t1;
return 0;
}
......@@ -50,10 +50,10 @@ int test1_2()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_1_2(a)) == 2> t1;
sa<sizeof(sink_1_2(ca)) == 2> t2;
sa<sizeof(sink_1_2(source())) == 2> t5;
sa<sizeof(sink_1_2(c_source())) == 2> t6;
sa<sizeof(sink_1_2(a)) == 2 * sizeof(long)> t1;
sa<sizeof(sink_1_2(ca)) == 2 * sizeof(long)> t2;
sa<sizeof(sink_1_2(source())) == 2 * sizeof(long)> t5;
sa<sizeof(sink_1_2(c_source())) == 2 * sizeof(long)> t6;
return 0;
}
......@@ -65,8 +65,8 @@ int test1_3()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_1_3(a)) == 3> t1;
sa<sizeof(sink_1_3(va)) == 3> t3;
sa<sizeof(sink_1_3(a)) == 3 * sizeof(long)> t1;
sa<sizeof(sink_1_3(va)) == 3 * sizeof(long)> t3;
return 0;
}
......@@ -78,10 +78,10 @@ int test1_4()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_1_4(a)) == 4> t1;
sa<sizeof(sink_1_4(ca)) == 4> t2;
sa<sizeof(sink_1_4(va)) == 4> t3;
sa<sizeof(sink_1_4(cva)) == 4> t4;
sa<sizeof(sink_1_4(a)) == 4 * sizeof(long)> t1;
sa<sizeof(sink_1_4(ca)) == 4 * sizeof(long)> t2;
sa<sizeof(sink_1_4(va)) == 4 * sizeof(long)> t3;
sa<sizeof(sink_1_4(cva)) == 4 * sizeof(long)> t4;
return 0;
}
......@@ -93,7 +93,7 @@ int test1_5()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_1_5(source())) == 5> t5;
sa<sizeof(sink_1_5(source())) == 5 * sizeof(long)> t5;
return 0;
}
......@@ -105,8 +105,8 @@ int test1_6()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_1_6(source())) == 6> t5;
sa<sizeof(sink_1_6(c_source())) == 6> t6;
sa<sizeof(sink_1_6(source())) == 6 * sizeof(long)> t5;
sa<sizeof(sink_1_6(c_source())) == 6 * sizeof(long)> t6;
return 0;
}
......@@ -118,8 +118,8 @@ int test1_7()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_1_7(source())) == 7> t5;
sa<sizeof(sink_1_7(v_source())) == 7> t7;
sa<sizeof(sink_1_7(source())) == 7 * sizeof(long)> t5;
sa<sizeof(sink_1_7(v_source())) == 7 * sizeof(long)> t7;
return 0;
}
......@@ -131,10 +131,10 @@ int test1_8()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_1_8(source())) == 8> t5;
sa<sizeof(sink_1_8(c_source())) == 8> t6;
sa<sizeof(sink_1_8(v_source())) == 8> t7;
sa<sizeof(sink_1_8(cv_source())) == 8> t8;
sa<sizeof(sink_1_8(source())) == 8 * sizeof(long)> t5;
sa<sizeof(sink_1_8(c_source())) == 8 * sizeof(long)> t6;
sa<sizeof(sink_1_8(v_source())) == 8 * sizeof(long)> t7;
sa<sizeof(sink_1_8(cv_source())) == 8 * sizeof(long)> t8;
return 0;
}
......
......@@ -8,14 +8,14 @@
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
struct four {char x[4];};
struct five {char x[5];};
struct six {char x[6];};
struct seven {char x[7];};
struct eight {char x[8];};
struct one {long x[1];};
struct two {long x[2];};
struct three {long x[3];};
struct four {long x[4];};
struct five {long x[5];};
struct six {long x[6];};
struct seven {long x[7];};
struct eight {long x[8];};
struct A
{
......@@ -44,13 +44,13 @@ int test7_1234567()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_7_1234567(a)) == 1> t1;
sa<sizeof(sink_7_1234567(ca)) == 2> t2;
sa<sizeof(sink_7_1234567(va)) == 3> t3;
sa<sizeof(sink_7_1234567(cva)) == 4> t4;
sa<sizeof(sink_7_1234567(source())) == 5> t5;
sa<sizeof(sink_7_1234567(c_source())) == 6> t6;
sa<sizeof(sink_7_1234567(v_source())) == 7> t7;
sa<sizeof(sink_7_1234567(a)) == 1 * sizeof(long)> t1;
sa<sizeof(sink_7_1234567(ca)) == 2 * sizeof(long)> t2;
sa<sizeof(sink_7_1234567(va)) == 3 * sizeof(long)> t3;
sa<sizeof(sink_7_1234567(cva)) == 4 * sizeof(long)> t4;
sa<sizeof(sink_7_1234567(source())) == 5 * sizeof(long)> t5;
sa<sizeof(sink_7_1234567(c_source())) == 6 * sizeof(long)> t6;
sa<sizeof(sink_7_1234567(v_source())) == 7 * sizeof(long)> t7;
return 0;
}
......@@ -68,14 +68,14 @@ int test7_1234568()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_7_1234568(a)) == 1> t1;
sa<sizeof(sink_7_1234568(ca)) == 2> t2;
sa<sizeof(sink_7_1234568(va)) == 3> t3;
sa<sizeof(sink_7_1234568(cva)) == 4> t4;
sa<sizeof(sink_7_1234568(source())) == 5> t5;
sa<sizeof(sink_7_1234568(c_source())) == 6> t6;
sa<sizeof(sink_7_1234568(v_source())) == 8> t7;
sa<sizeof(sink_7_1234568(cv_source())) == 8> t8;
sa<sizeof(sink_7_1234568(a)) == 1 * sizeof(long)> t1;
sa<sizeof(sink_7_1234568(ca)) == 2 * sizeof(long)> t2;
sa<sizeof(sink_7_1234568(va)) == 3 * sizeof(long)> t3;
sa<sizeof(sink_7_1234568(cva)) == 4 * sizeof(long)> t4;
sa<sizeof(sink_7_1234568(source())) == 5 * sizeof(long)> t5;
sa<sizeof(sink_7_1234568(c_source())) == 6 * sizeof(long)> t6;
sa<sizeof(sink_7_1234568(v_source())) == 8 * sizeof(long)> t7;
sa<sizeof(sink_7_1234568(cv_source())) == 8 * sizeof(long)> t8;
return 0;
}
......@@ -93,14 +93,14 @@ int test7_1234578()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_7_1234578(a)) == 1> t1;
sa<sizeof(sink_7_1234578(ca)) == 2> t2;
sa<sizeof(sink_7_1234578(va)) == 3> t3;
sa<sizeof(sink_7_1234578(cva)) == 4> t4;
sa<sizeof(sink_7_1234578(source())) == 5> t5;
sa<sizeof(sink_7_1234578(c_source())) == 8> t6;
sa<sizeof(sink_7_1234578(v_source())) == 7> t7;
sa<sizeof(sink_7_1234578(cv_source())) == 8> t8;
sa<sizeof(sink_7_1234578(a)) == 1 * sizeof(long)> t1;
sa<sizeof(sink_7_1234578(ca)) == 2 * sizeof(long)> t2;
sa<sizeof(sink_7_1234578(va)) == 3 * sizeof(long)> t3;
sa<sizeof(sink_7_1234578(cva)) == 4 * sizeof(long)> t4;
sa<sizeof(sink_7_1234578(source())) == 5 * sizeof(long)> t5;
sa<sizeof(sink_7_1234578(c_source())) == 8 * sizeof(long)> t6;
sa<sizeof(sink_7_1234578(v_source())) == 7 * sizeof(long)> t7;
sa<sizeof(sink_7_1234578(cv_source())) == 8 * sizeof(long)> t8;
return 0;
}
......@@ -118,13 +118,13 @@ int test7_1234678()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_7_1234678(a)) == 1> t1;
sa<sizeof(sink_7_1234678(ca)) == 2> t2;
sa<sizeof(sink_7_1234678(va)) == 3> t3;
sa<sizeof(sink_7_1234678(cva)) == 4> t4;
sa<sizeof(sink_7_1234678(c_source())) == 6> t6;
sa<sizeof(sink_7_1234678(v_source())) == 7> t7;
sa<sizeof(sink_7_1234678(cv_source())) == 8> t8;
sa<sizeof(sink_7_1234678(a)) == 1 * sizeof(long)> t1;
sa<sizeof(sink_7_1234678(ca)) == 2 * sizeof(long)> t2;
sa<sizeof(sink_7_1234678(va)) == 3 * sizeof(long)> t3;
sa<sizeof(sink_7_1234678(cva)) == 4 * sizeof(long)> t4;
sa<sizeof(sink_7_1234678(c_source())) == 6 * sizeof(long)> t6;
sa<sizeof(sink_7_1234678(v_source())) == 7 * sizeof(long)> t7;
sa<sizeof(sink_7_1234678(cv_source())) == 8 * sizeof(long)> t8;
return 0;
}
......@@ -142,13 +142,13 @@ int test7_1235678()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_7_1235678(a)) == 1> t1;
sa<sizeof(sink_7_1235678(ca)) == 2> t2;
sa<sizeof(sink_7_1235678(va)) == 3> t3;
sa<sizeof(sink_7_1235678(source())) == 5> t5;
sa<sizeof(sink_7_1235678(c_source())) == 6> t6;
sa<sizeof(sink_7_1235678(v_source())) == 7> t7;
sa<sizeof(sink_7_1235678(cv_source())) == 8> t8;
sa<sizeof(sink_7_1235678(a)) == 1 * sizeof(long)> t1;
sa<sizeof(sink_7_1235678(ca)) == 2 * sizeof(long)> t2;
sa<sizeof(sink_7_1235678(va)) == 3 * sizeof(long)> t3;
sa<sizeof(sink_7_1235678(source())) == 5 * sizeof(long)> t5;
sa<sizeof(sink_7_1235678(c_source())) == 6 * sizeof(long)> t6;
sa<sizeof(sink_7_1235678(v_source())) == 7 * sizeof(long)> t7;
sa<sizeof(sink_7_1235678(cv_source())) == 8 * sizeof(long)> t8;
return 0;
}
......@@ -166,14 +166,14 @@ int test7_1245678()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_7_1245678(a)) == 1> t1;
sa<sizeof(sink_7_1245678(ca)) == 2> t2;
sa<sizeof(sink_7_1245678(va)) == 4> t3;
sa<sizeof(sink_7_1245678(cva)) == 4> t4;
sa<sizeof(sink_7_1245678(source())) == 5> t5;
sa<sizeof(sink_7_1245678(c_source())) == 6> t6;
sa<sizeof(sink_7_1245678(v_source())) == 7> t7;
sa<sizeof(sink_7_1245678(cv_source())) == 8> t8;
sa<sizeof(sink_7_1245678(a)) == 1 * sizeof(long)> t1;
sa<sizeof(sink_7_1245678(ca)) == 2 * sizeof(long)> t2;
sa<sizeof(sink_7_1245678(va)) == 4 * sizeof(long)> t3;
sa<sizeof(sink_7_1245678(cva)) == 4 * sizeof(long)> t4;
sa<sizeof(sink_7_1245678(source())) == 5 * sizeof(long)> t5;
sa<sizeof(sink_7_1245678(c_source())) == 6 * sizeof(long)> t6;
sa<sizeof(sink_7_1245678(v_source())) == 7 * sizeof(long)> t7;
sa<sizeof(sink_7_1245678(cv_source())) == 8 * sizeof(long)> t8;
return 0;
}
......@@ -191,14 +191,14 @@ int test7_1345678()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_7_1345678(a)) == 1> t1;
sa<sizeof(sink_7_1345678(ca)) == 4> t2;
sa<sizeof(sink_7_1345678(va)) == 3> t3;
sa<sizeof(sink_7_1345678(cva)) == 4> t4;
sa<sizeof(sink_7_1345678(source())) == 5> t5;
sa<sizeof(sink_7_1345678(c_source())) == 6> t6;
sa<sizeof(sink_7_1345678(v_source())) == 7> t7;
sa<sizeof(sink_7_1345678(cv_source())) == 8> t8;
sa<sizeof(sink_7_1345678(a)) == 1 * sizeof(long)> t1;
sa<sizeof(sink_7_1345678(ca)) == 4 * sizeof(long)> t2;
sa<sizeof(sink_7_1345678(va)) == 3 * sizeof(long)> t3;
sa<sizeof(sink_7_1345678(cva)) == 4 * sizeof(long)> t4;
sa<sizeof(sink_7_1345678(source())) == 5 * sizeof(long)> t5;
sa<sizeof(sink_7_1345678(c_source())) == 6 * sizeof(long)> t6;
sa<sizeof(sink_7_1345678(v_source())) == 7 * sizeof(long)> t7;
sa<sizeof(sink_7_1345678(cv_source())) == 8 * sizeof(long)> t8;
return 0;
}
......@@ -216,13 +216,13 @@ int test7_2345678()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_7_2345678(ca)) == 2> t2;
sa<sizeof(sink_7_2345678(va)) == 3> t3;
sa<sizeof(sink_7_2345678(cva)) == 4> t4;
sa<sizeof(sink_7_2345678(source())) == 5> t5;
sa<sizeof(sink_7_2345678(c_source())) == 6> t6;
sa<sizeof(sink_7_2345678(v_source())) == 7> t7;
sa<sizeof(sink_7_2345678(cv_source())) == 8> t8;
sa<sizeof(sink_7_2345678(ca)) == 2 * sizeof(long)> t2;
sa<sizeof(sink_7_2345678(va)) == 3 * sizeof(long)> t3;
sa<sizeof(sink_7_2345678(cva)) == 4 * sizeof(long)> t4;
sa<sizeof(sink_7_2345678(source())) == 5 * sizeof(long)> t5;
sa<sizeof(sink_7_2345678(c_source())) == 6 * sizeof(long)> t6;
sa<sizeof(sink_7_2345678(v_source())) == 7 * sizeof(long)> t7;
sa<sizeof(sink_7_2345678(cv_source())) == 8 * sizeof(long)> t8;
return 0;
}
......
......@@ -8,14 +8,14 @@
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct three {char x[3];};
struct four {char x[4];};
struct five {char x[5];};
struct six {char x[6];};
struct seven {char x[7];};
struct eight {char x[8];};
struct one {long x[1];};
struct two {long x[2];};
struct three {long x[3];};
struct four {long x[4];};
struct five {long x[5];};
struct six {long x[6];};
struct seven {long x[7];};
struct eight {long x[8];};
struct A
{
......@@ -45,14 +45,14 @@ int test8_12345678()
const A ca;
volatile A va;
const volatile A cva;
sa<sizeof(sink_8_12345678(a)) == 1> t1;
sa<sizeof(sink_8_12345678(ca)) == 2> t2;
sa<sizeof(sink_8_12345678(va)) == 3> t3;
sa<sizeof(sink_8_12345678(cva)) == 4> t4;
sa<sizeof(sink_8_12345678(source())) == 5> t5;
sa<sizeof(sink_8_12345678(c_source())) == 6> t6;
sa<sizeof(sink_8_12345678(v_source())) == 7> t7;
sa<sizeof(sink_8_12345678(cv_source())) == 8> t8;
sa<sizeof(sink_8_12345678(a)) == 1 * sizeof(long)> t1;
sa<sizeof(sink_8_12345678(ca)) == 2 * sizeof(long)> t2;
sa<sizeof(sink_8_12345678(va)) == 3 * sizeof(long)> t3;
sa<sizeof(sink_8_12345678(cva)) == 4 * sizeof(long)> t4;
sa<sizeof(sink_8_12345678(source())) == 5 * sizeof(long)> t5;
sa<sizeof(sink_8_12345678(c_source())) == 6 * sizeof(long)> t6;
sa<sizeof(sink_8_12345678(v_source())) == 7 * sizeof(long)> t7;
sa<sizeof(sink_8_12345678(cv_source())) == 8 * sizeof(long)> t8;
return 0;
}
......
......@@ -8,8 +8,8 @@
template <bool> struct sa;
template <> struct sa<true> {};
struct one {char x[1];};
struct two {char x[2];};
struct one {long x[1];};
struct two {long x[2];};
struct A {};
......@@ -25,7 +25,7 @@ A&& source() {static A a; return movel(a);}
int test1()
{
sa<sizeof(foo(source())) == 2> t1;
sa<sizeof(foo(source())) == 2 * sizeof(long)> t1;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment