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/42668] New: internal compiler error: in expand_expr_real_1, at expr.c:9314


Compile with -O2:
Only happens with -fno-builtin-strcpy
Seemingly related to Bug 42667.
Looks like there is a problem with implicit builtin function declarations and
the ternary operator : ?.
warning: incompatible implicit declaration of built-in function ?strcpy'

------------------
unsigned int BadBug();

void Constructor()
{
   Hey(BadBug);
}

unsigned int BadBug()
{
   void * project;
   char * path = Bla(project);
   char directory[100];

   if(project)
   {
      if(path)
         You(directory, path);
   }
   else
   {
      strcpy(directory, path ? path : "");
   }
   Blo(path ? directory : "");
   return 1;
}


-- 
           Summary: internal compiler error: in expand_expr_real_1, at
                    expr.c:9314
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jerstlouis at gmail dot com
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: i686-linux-gnu


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


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