Is this FE bug or am I missing something?

Igor Shevlyakov
Mon Sep 12 05:56:00 GMT 2016


Small sample below fails (at least on 6.1) for multiple targets. The
difference between two functions start at the very first tree pass...

Please confirm that I'm not crazy and it's not supposed to be like this...


#include "limits.h"
#include "stdio.h"

int* __attribute__((noinline)) f1(int* p, int x)
return &p[x + 1];

int* __attribute__((noinline)) f2(int*p, int x)
return &p[1 + x];

int P[10];

int main()
int x = INT_MAX;
if (f1(P, x) != f2(P, x)) {

More information about the Gcc mailing list