This is the mail archive of the
mailing list for the GCC project.
Re: Is test case with 700k lines of code a valid test case?
- From: Andrey Tarasevich <tarasevich at cs dot uni-saarland dot de>
- To: C BergstrÃm <cbergstrom at pathscale dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Mon, 14 Mar 2016 17:25:10 +0100
- Subject: Re: Is test case with 700k lines of code a valid test case?
- Authentication-results: sourceware.org; auth=none
- References: <F3880EB7-70F6-475B-A6E6-363B50DD2AD4 at cs dot uni-saarland dot de> <CAOnawYqoZhytKOq=tect8FFo+QmW_--3sgKq7oG1Qh0cVQXZhA at mail dot gmail dot com> <D3072B8F-770F-4951-A61D-8658659AB1C6 at cs dot uni-saarland dot de> <CAOnawYqo-3q8isc-s46OCsUO_993MMibkBk7vhtT_x=ki+C-QQ at mail dot gmail dot com>
Yeah, I guess attempt to commit a C file with 700K lines of code wonât end well for a developer.
Thanks for clarifying things!
> On 14 Mar 2016, at 17:05, C BergstrÃm <email@example.com> wrote:
> I don't speak with any community authority - I think your test tool is
> misconfigured then. I don't see any pragmatic reason to generate such
> a test. It's unlikely to mirror any real world code and artificial
> test cases like this, at best only serve as some arbitrary data point.
> On Mon, Mar 14, 2016 at 11:52 PM, Andrey Tarasevich
> <firstname.lastname@example.org> wrote:
>>> On 14 Mar 2016, at 16:39, C BergstrÃm <email@example.com> wrote:
>>> On Mon, Mar 14, 2016 at 11:31 PM, Andrey Tarasevich
>>> <firstname.lastname@example.org> wrote:
>>>> I have a source file with 700k lines of code 99% of which are printf() statements. Compiling this test case crashes GCC 5.3.0 with segmentation fault.
>>>> Can such test case be considered valid or source files of size 35 MB are too much for a C compiler and it should crash? It crashes on Ubuntu 14.04 64bit with 16GB of RAM.
>>> Sorry I can't help, but troll reply..
>>> If you're intentionally combining everything into a single source for
>>> optimization reasons - you can expect it to really stress and hit many
>>> problems in the compiler.
>>> If your code is just extremely poorly written or not organized well -
>>> I'd encourage you to both file bug reports (of a more reduced nature
>>> than 700ksloc) and refactor things so that it's better designed.
>> Not that I intentionally written such code, but it was automatically generated by test tool.