[llvm-dev] Wrong types for attribute

陳韋任 via llvm-dev llvm-dev at lists.llvm.org
Sat Sep 9 20:32:39 PDT 2017


Hi Dipanjan,

  One place is suspicious,

      i16 nonnull %64

According to the LangRef [1], `nonnull` attribute can only be applied
on pointer typed parameter. I guess that's why
you receive such kind of error.

BTW, could you try the latest release? I notice you're using LLVM 3.8.

[1] https://llvm.org/docs/LangRef.html#parameter-attributes

Regards,
chenwj


2017-09-10 11:20 GMT+08:00 Dipanjan Das via llvm-dev <llvm-dev at lists.llvm.org>:
>
> I am using DataFlowSanitizer pass on ping (inetutuils) source. On clang
> optimization level higher than O0, I receive the following error:
>
> -----------------------------------------------------------------
> Wrong types for attribute: byval inalloca nest noalias nocapture nonnull
> readnone readonly sret dereferenceable(1) dereferenceable_or_null(1)
>
> %83 = call i32 (i8*, i64, i8*, i16, i16, i16, i16*, i16*, ...)
> @__dfsw_snprintf(i8* %call21, i64 %conv20, i8* nonnull getelementptr
> inbounds ([8 x i8], [8 x i8]* @.str.9.43, i64 0, i64 0), i16 nonnull %64,
> i16 %63, i16 0, i16* %82, i16* %labelreturn, i8* %78, i8* %call6) #11, !dbg
> !3072
>
> fatal error: error in backend: Broken function found, compilation aborted!
> clang-3.8: error: clang frontend command failed with exit
> -----------------------------------------------------------------
>
> What does this error mean?
>
> --
>
> Thanks & Regards,
>
> Dipanjan
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>



-- 
Wei-Ren Chen (陳韋任)
Homepage: https://people.cs.nctu.edu.tw/~chenwj


More information about the llvm-dev mailing list