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 debug/17572] New: gcc.dg/debug/crash1.c fails with checking enabled


As noted here:
http://gcc.gnu.org/ml/gcc-testresults/2004-09/msg00877.html

gcc.dg/debug/crash1.c fails with checking enabled.  The crash occurs because we 
enter the default: case of a giant tree code switch and any unhandled cases are 
considered an error.  The tree code I get under gdb that isn't handled is a 
FIX_TRUNC_EXPR.  It makes sense to me that we get one of these given the 
testcase code is truncating a float.  So we probably just need to handle that 
case in the function.

Here's the crash1.i file.  To reproduce the crash, target sparc-sun-solaris2.9, 
configure with --enable-checking and compile with:
cc1 -fpreprocessed crash1.i -quiet -dumpbase crash1.c -mcpu=v7 -auxbase-strip 
crash1.s -gdwarf-2 -version -o crash1.s


# 1 "/tmp/kg/34/egcc-3.4-CVS20040919/gcc/testsuite/gcc.dg/debug/crash1.c"
# 1 "/tmp/kg/34/build/gcc/testsuite//"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "/tmp/kg/34/egcc-3.4-CVS20040919/gcc/testsuite/gcc.dg/debug/crash1.c"



int main() {
  double d = 1.0;
  char x[(int) d];
  return 0;
}

-- 
           Summary: gcc.dg/debug/crash1.c fails with checking enabled
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ghazi at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
                    com
 GCC build triplet: sparc-sun-solaris2.9
  GCC host triplet: sparc-sun-solaris2.9
GCC target triplet: sparc-sun-solaris2.9


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


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