-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[llvm-gcc] Error when an implicitly external function is re-declared as static #616
Comments
assigned to @lattner |
This bug blocks the correct functioning of the espresso Malloc Benchmark. |
I love C! :) |
FWIW, this is probably related to Bug 232. |
Here's another broken testcase: static void two(int a, int b) {} ... in this case, the body of 'two' never gets emitted. -Chris |
Fixed. Here's the (one token) patch: Testcase here: It turns out that the second "bad case" that I included in this bug is actually -Chris |
*** Bug #604 has been marked as a duplicate of this bug. *** |
I'm reopening this bug. There seems to be no way to fix both this bug and Bug It appears that the root cause of this bug is internal to the GCC front-end. -Chris |
Note that this bug is preventing us from being able to compile 134.perl. There static int func();
|
I'm curious. How are the names of the two "func" functions different? Or, did |
The C front-end (buggily) gave the prototype one name ".func_1" and the body This is a CFE bug. -Chris |
Fixed. Testcase here: Patch here: -Chris |
mentioned in issue llvm/llvm-bugzilla-archive#33311 |
This PR adds the following operations for the builtin binary fp2fp functions: - `cir.copysign` for `__builtin_copysign`; - `cir.fmax` for `__builtin_fmax`; - `cir.fmin` for `__builtin_fmin`; - `cir.fmod` for `__builtin_fmod`; - `cir.pow` for `__builtin_pow`. This PR also includes CIRGen support for these new operations.
This PR adds the following operations for the builtin binary fp2fp functions: - `cir.copysign` for `__builtin_copysign`; - `cir.fmax` for `__builtin_fmax`; - `cir.fmin` for `__builtin_fmin`; - `cir.fmod` for `__builtin_fmod`; - `cir.pow` for `__builtin_pow`. This PR also includes CIRGen support for these new operations.
LLVM lowering for the following operations is introduced in llvm#616 and llvm#651: `cos`, `exp`, `exp2`, `log`, `log10`, `log2`, `sin`, `sqrt`, `fmod`, and `pow`. However, they are not lowered to their corresponding LLVM intrinsics; instead they are transformed to libc calls during lowering prepare. This does not match the upstream behavior. This PR tries to correct this mistake. It makes all CIR FP intrinsic ops lower to their corresponding LLVM intrinsics (`fmod` is a special case and it is lowered to the `frem` LLVM instruction).
This PR adds the following operations for the builtin binary fp2fp functions: - `cir.copysign` for `__builtin_copysign`; - `cir.fmax` for `__builtin_fmax`; - `cir.fmin` for `__builtin_fmin`; - `cir.fmod` for `__builtin_fmod`; - `cir.pow` for `__builtin_pow`. This PR also includes CIRGen support for these new operations.
LLVM lowering for the following operations is introduced in llvm#616 and llvm#651: `cos`, `exp`, `exp2`, `log`, `log10`, `log2`, `sin`, `sqrt`, `fmod`, and `pow`. However, they are not lowered to their corresponding LLVM intrinsics; instead they are transformed to libc calls during lowering prepare. This does not match the upstream behavior. This PR tries to correct this mistake. It makes all CIR FP intrinsic ops lower to their corresponding LLVM intrinsics (`fmod` is a special case and it is lowered to the `frem` LLVM instruction).
Extended Description
The attached code produces a warning with GCC but otherwise produces a single
function defintion.
With LLVM GCC, the attached code generates one function declaration (but no
function definition) and one internal function (which is defined).
The text was updated successfully, but these errors were encountered: