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]
Other format: [Raw text]

[Bug c++/14545] [3.4/3.5 Regression] Cannot compile pooma-gcc (regression)


------- Additional Comments From schmid at snake dot iap dot physik dot tu-darmstadt dot de  2004-03-13 23:41 -------
Here is a reduced version of the testcase: 
 
source code t.C 
t.C  
 
class NoInit {}; 
 
template<class DT> 
class DomainBase 
{ 
public: 
  typedef typename DT::AskDomain_t   AskDomain_t; 
  typedef typename DT::Domain_t      Domain_t; 
 
  inline 
  Domain_t &unwrap() { return *static_cast<Domain_t *>(this); } 
 
  const Domain_t &unwrap() const { 
    return *static_cast<Domain_t *>(const_cast<DomainBase<DT> *>(this)); 
  } 
 
  AskDomain_t firsts() const { 
    AskDomain_t retval  = NoInit(); 
    int i = 1; 
    retval[i] = unwrap()[i].first(); 
    return retval; 
  } 
 
}; 
 
The initialisation with NoInit() is responsible for the ice. When I remove the 
unwrap functions and the Domain_t typedef the code still ices. I have no idea 
whether the code is then still legal, though. 
 
g++ -v -c t.C  
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/specs 
Configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c
++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug 
Thread model: posix 
gcc version 3.4.0 20040313 (prerelease) 
 /usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -quiet -v -D_GNU_SOURCE 
t.C -quiet -dumpbase t.C -mtune=pentiumpro -auxbase t -version -o /tmp/
ccGy3M7a.s 
ignoring nonexistent directory "NONE/include" 
ignoring nonexistent directory "/usr/local/lib/gcc/
i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/include" 
#include "..." search starts here: 
#include <...> search starts here: 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
i686-pc-linux-gnu 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
backward 
 /usr/local/include 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include 
 /usr/include 
End of search list. 
GNU C++ version 3.4.0 20040313 (prerelease) (i686-pc-linux-gnu) 
	compiled by GNU C version 3.4.0 20040313 (prerelease). 
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64274 
t.C: In member function `typename DT::AskDomain_t DomainBase<DT>::firsts() 
const': 
t.C:18: internal compiler error: Segmentation fault 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14545


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