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

           Summary: Assertion `Reg && "this is not a register!"' failed
                    during linux kernel building.
           Product: new-bugs
           Version: 2.5
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=3521)
 --> (http://llvm.org/bugs/attachment.cgi?id=3521)
Preprocessed kernel file that causes fail.

I use llvm-gcc to build linux kernel of one of the latest version (2.6.30.5).

llvm-gcc can't process file drivers/acpi/sbshc.c and exit with assertion `Reg
&& "this is not a register!"'.

Preprocessed file drivers/acpi/sbshc.c is attached.

To process it command
llvm-gcc -c drivers_acpi_sbshc.i
is used.

Note that there's no such problem if you just remove one case from switch: 
916c916
<  return ({ typeof(per_cpu__current_task) ret__; switch
(sizeof(per_cpu__current_task)) { case 1: asm("mov" "b ""%%""gs"":%P" "1"",%0"
: "=q" (ret__) : "m" (per_cpu__current_task)); break; case 2: asm("mov" "w
""%%""gs"":%P" "1"",%0" : "=r" (ret__) : "m" (per_cpu__current_task)); break;
case 4: asm("mov" "l ""%%""gs"":%P" "1"",%0" : "=r" (ret__) : "m"
(per_cpu__current_task)); break; case 8: asm("mov" "q ""%%""gs"":%P" "1"",%0" :
"=r" (ret__) : "m" (per_cpu__current_task)); break; default:
__bad_percpu_size(); } ret__; });
---
>  return ({ typeof(per_cpu__current_task) ret__; switch 
> (sizeof(per_cpu__current_task)) { case 1: asm("mov" "b ""%%""gs"":%P" 
> "1"",%0" : "=q" (ret__) : "m" (per_cpu__current_task)); break; case 2: 
> asm("mov" "w ""%%""gs"":%P" "1"",%0" : "=r" (ret__) : "m" 
> (per_cpu__current_task)); break; case 4: asm("mov" "l ""%%""gs"":%P" "1"",%0" 
> : "=r" (ret__) : "m" (per_cpu__current_task)); break; default: 
> __bad_percpu_size(); } ret__; });

So it seems that this problem is connected with this case expression.


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to