-# Copyright 2003, 2007, 2008 Free Software Foundation, Inc.
+# Copyright 2003-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
set ws "\[\r\n\t \]*"
set nl "\[\r\n\]+"
-if $tracelevel then {
- strace $tracelevel
- }
-
if { [skip_cplus_tests] } { continue }
#
# test running programs
#
-set prms_id 0
-set bug_id 0
-set testfile "gdb1355"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile .cc
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- untested gdb1355.exp
- return -1
+if [get_compiler_info "c++"] {
+ return -1
}
-if [get_compiler_info ${binfile} "c++"] {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
return -1
}
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
if ![runto_main] then {
perror "couldn't run to main"
continue
set f_i "${ws}int m_int;"
set f_c "${ws}char m_char;"
-set f_li "${ws}long int m_long_int;"
+set f_li "${ws}long( int)? m_long_int;"
set f_ui "${ws}unsigned int m_unsigned_int;"
-set f_lui "${ws}long unsigned int m_long_unsigned_int;"
-set f_si "${ws}short int m_short_int;"
-set f_sui "${ws}short unsigned int m_short_unsigned_int;"
+set f_lui "${ws}(long unsigned int|unsigned long) m_long_unsigned_int;"
+set f_si "${ws}short( int)? m_short_int;"
+set f_sui "${ws}(short unsigned int|unsigned short) m_short_unsigned_int;"
set f_uc "${ws}unsigned char m_unsigned_char;"
set f_f "${ws}float m_float;"
set f_d "${ws}double m_double;"
set f_b "${ws}bool m_bool;"
set itc "<invalid type code ${decimal}>"
-set bad_i "${ws}(${itc}|int) m_int;";
+set bad_i "${ws}(${itc}|int) m_int;"
set bad_c "${ws}(${itc}|char) m_char;"
set bad_li "${ws}(${itc}|long int) m_long_int;"
set bad_ui "${ws}(${itc}|unsigned int) m_unsigned_int;"