aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.c++/ref-types.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.c++/ref-types.cc')
-rw-r--r--gdb/testsuite/gdb.c++/ref-types.cc51
1 files changed, 50 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.c++/ref-types.cc b/gdb/testsuite/gdb.c++/ref-types.cc
index 8ee5c40..23cc510 100644
--- a/gdb/testsuite/gdb.c++/ref-types.cc
+++ b/gdb/testsuite/gdb.c++/ref-types.cc
@@ -1,3 +1,5 @@
+int main2(void);
+
void marker1 (void)
{
@@ -25,6 +27,53 @@ int main(void)
breakpoint();
#endif
marker1();
-
+
+ main2();
+
+ return 0;
+}
+
+int f()
+{
+ int f1;
+ f1 = 1;
+ return f1;
+}
+
+int main2(void)
+{
+ char C;
+ unsigned char UC;
+ short S;
+ unsigned short US;
+ int I;
+ unsigned int UI;
+ long L;
+ unsigned long UL;
+ float F;
+ double D;
+ char &rC = C;
+ unsigned char &rUC = UC;
+ short &rS = S;
+ unsigned short &rUS = US;
+ int &rI = I;
+ unsigned int &rUI = UI;
+ long &rL = L;
+ unsigned long &rUL = UL;
+ float &rF = F;
+ double &rD = D;
+ C = 'A';
+ UC = 21;
+ S = -14;
+ US = 7;
+ I = 102;
+ UI = 1002;
+ L = -234;
+ UL = 234;
+ F = 1.25E10;
+ D = -1.375E-123;
+ I = f();
+
return 0;
+
}