aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-01-31 09:31:52 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-01-31 09:31:52 +0100
commit1306a81d81747ccc36f3ca53af74a3d069fafb7d (patch)
tree2b05a215f7e85a7a5f2b75c760f521ae28a5992d /gcc
parent7b56ebc34708f685bd5cf47763d13614c7e707e1 (diff)
downloadgcc-1306a81d81747ccc36f3ca53af74a3d069fafb7d.zip
gcc-1306a81d81747ccc36f3ca53af74a3d069fafb7d.tar.gz
gcc-1306a81d81747ccc36f3ca53af74a3d069fafb7d.tar.bz2
re PR preprocessor/69869 (internal compiler error: Segmentation fault in call to skip_macro_block_comment when using '-traditional-cpp')
PR preprocessor/69869 * traditional.c (skip_macro_block_comment): Return bool, true if the macro block comment is unterminated. (copy_comment): Use return value from skip_macro_block_comment instead of always false. * gcc.dg/cpp/trad/pr69869.c: New test. From-SVN: r257220
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/pr69869.c8
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 80cb488..ed44f56 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2018-01-31 Jakub Jelinek <jakub@redhat.com>
+ PR preprocessor/69869
+ * gcc.dg/cpp/trad/pr69869.c: New test.
+
PR c/84100
* gcc.dg/pr84100.c: New test.
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/pr69869.c b/gcc/testsuite/gcc.dg/cpp/trad/pr69869.c
new file mode 100644
index 0000000..aa7aa83
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/trad/pr69869.c
@@ -0,0 +1,8 @@
+/* PR preprocessor/69869 */
+/* { dg-do preprocess } */
+/* { dg-options "-traditional-cpp" } */
+
+#define C(a,b)a/**/b
+C (foo/,**/)
+C (foo/,*)
+/* { dg-error "-:unterminated comment" "" {target "*-*-*"} .-1 } */