iains / gcc-13-branch

GCC 13 for Darwin with experimental Arm64 support. Current release 13.3-darwin-r0 [May 2024]
GNU General Public License v2.0
10 stars 2 forks source link

Issue with gcc 13.1.0 for compiling certain codes. #4

Closed vedanta28 closed 1 year ago

vedanta28 commented 1 year ago

Code:

#include <iostream>
#include <vector>

std::vector<int> adj[200000];

int main() {
   return 0;
}

When, compiling this using gcc 13.1.0 (Downloaded via Homebrew) I get the following error:

/var/folders/v7/yk8tz4j54cl2lhp1f80nyz700000gn/T//cc2HpyzP.s:371:29: error: unexpected token in '.section' directive
        .section .data.rel.ro.local

This code was working fine for previous versions but, it is causing troubles now. Reducing the size of the vector is working but this code is not compiling.

More info here: https://codeforces.com/blog/entry/116459, https://stackoverflow.com/questions/76287256/declaring-array-of-large-size-of-vectorint-using-gcc-causes-error-changing-to

iains commented 1 year ago

fixed on the branch.