This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Intern. comp. err. for C++ initialize at first use.


Version 2.95.2
SuSE 6.4 with kernel 2.2.16-SuSE-3

/*===========================================================================*/
Command line: 'gcc -c -O3 -ggdb -v --save-temps gcc-bug.cc'

/*===========================================================================*/
Output

Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -D__OPTIMIZE__ -ggdb -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di486 -D__i486 -D__i486__ gcc-bug.cc gcc-bug.ii
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++
 /usr/local/include
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/../../../../i486-suse-linux/include
End of omitted list.
 /usr/lib/gcc-lib/i486-suse-linux/2.95.2/cc1plus gcc-bug.ii -quiet -dumpbase gcc-bug.cc -ggdb -O3 -version -o gcc-bug.s
GNU C++ version 2.95.2 19991024 (release) (i486-suse-linux) compiled by GNU C version 2.95.2 19991024 (release).
gcc-bug.cc:2: Internal compiler error in `output_die', at dwarf2out.c:5426
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

/*===========================================================================*/
gcc-bug.ii

# 1 "gcc-bug.cc"
struct MemChecker { ~MemChecker() {} };
void mc() { static MemChecker mem_checker; }

/*===========================================================================*/
Problem:

This boiled-down code represents a common method of ensuring that an object is
initialized before its first use, and that it is initialized if and only if it
is used.

-Robert Dick-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]