[LLVMbugs] [Bug 3986] New: inline may be miscompiled in recent revisions

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Apr 14 05:50:41 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=3986

           Summary: inline may be miscompiled in recent revisions
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: preprocessor
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: roberto at freebsd.org
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2823)
 --> (http://llvm.org/bugs/attachment.cgi?id=2823)
Virgin lex.c.blt code

I'm compiling Ruby from trunk with clang r69035 and I get undefined symbol
during link.  The missing function is "tagged" with

__inline __attribute((__gnuc_inline__))

The second argument is ignored:
-----
In file included from ../parse.y:6010:
keywords:75:17: warning: '__gnu_inline__' attribute ignored
__attribute__ ((__gnu_inline__))
                ^
-----

so I guess that "__inline" is generating the miscompilation.  Testing with
"inline" leads to the same error: 

Undefined symbols:
  "_rb_reserved_word", referenced from:
      _reg_named_capture_assign_iter in parse.o
      _parser_yylex in parse.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

My guess is that "inline"/"__inline" has been broken in recent revisions.

virgin code in "lex.c", copied from "lex.c.blt" (attached) is
-----
#ifdef __GNUC__
__inline
#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif
#endif
const struct kwtable *
rb_reserved_word (str, len)
     register const char *str;
     register unsigned int len;
{
  static const struct kwtable wordlist[] =
    {
-----

r68705 was handling it correctly.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list