Commit ba6b3795 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/69797 (ICE on invalid code on x86_64-linux-gnu in operator[], at vec.h:714)

	PR c++/69797
	* c-common.c (sync_resolve_size): Diagnose too few arguments
	even when params is non-NULL empty vector.

	* c-c++-common/pr69797.c: New test.

From-SVN: r233434
parent c297d256
2016-02-15 Jakub Jelinek <jakub@redhat.com>
PR c++/69797
* c-common.c (sync_resolve_size): Diagnose too few arguments
even when params is non-NULL empty vector.
2016-02-08 Bernd Schmidt <bschmidt@redhat.com> 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
PR target/60410 PR target/60410
......
...@@ -10675,7 +10675,7 @@ sync_resolve_size (tree function, vec<tree, va_gc> *params, bool fetch) ...@@ -10675,7 +10675,7 @@ sync_resolve_size (tree function, vec<tree, va_gc> *params, bool fetch)
tree type; tree type;
int size; int size;
if (!params) if (vec_safe_is_empty (params))
{ {
error ("too few arguments to function %qE", function); error ("too few arguments to function %qE", function);
return 0; return 0;
......
2016-02-15 Jakub Jelinek <jakub@redhat.com>
PR c++/69797
* c-c++-common/pr69797.c: New test.
2016-02-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> 2016-02-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* lib/target-supports.exp (check_effective_target_section_anchors): Add * lib/target-supports.exp (check_effective_target_section_anchors): Add
......
/* PR c++/69797 */
/* { dg-do compile } */
void
foo ()
{
__atomic_fetch_add (); /* { dg-error "too few arguments to function" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment